Drew
April 11th, 2001, 08:42 AM
What control would I use to play music on my form?
What would the code look like? What type of music file would I use?
What would the code look like? What type of music file would I use?
|
Click to See Complete Forum and Search --> : music Drew April 11th, 2001, 08:42 AM What control would I use to play music on my form? What would the code look like? What type of music file would I use? Cimperiali April 11th, 2001, 08:50 AM Microsoft Mulrimedia Control, for example(look for components do add it to your toolbar), to play .wav and .mdi files... For code example, I cannot help right know. Maybe later... Cesare Imperiali Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru. Cimperiali April 11th, 2001, 09:18 AM Here is an example of code Do not forget the code to close mmc control. Maybe you can find more information in MSDN Private Sub Command1_Click() 'type of use you're going to do of mmc MMControl1.DeviceType = "WaveAudio" 'the file you want to load MMControl1.FileName = "C:\WINDOWS\alarm.WAV" 'open the file MMControl1.Command = "Open" 'make it work MMControl1.Command = "play" End Sub Private Sub MMControl1_Done(NotifyCode As Integer) 'event triggered at end 'close control MMControl1.Command = "Close" 'clear filename MMControl1.FileName = "" End Sub Best regards Cesare Imperiali Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |