|
-
April 11th, 2001, 08:42 AM
#1
music
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?
-
April 11th, 2001, 08:50 AM
#2
Re: music
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.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
-
April 11th, 2001, 09:18 AM
#3
Re: music
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.
...at present time, using mainly Net 4.0, Vs 2010
Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|