PDA

Click to See Complete Forum and Search --> : Sound knowlege


Hightower
Jul 17th, 2001, 10:03 PM
I need some help playing a .wav file when a form opens. Someone told me I need to use API so I thought i'd post here.

Matthew Gates
Jul 18th, 2001, 12:37 AM
Use the PlaySound API function.


Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As _
Long, ByVal dwFlags As Long) As Long

Private Sub Command1_Click()
PlaySound "C:\MyFile.wav", 0&, &H1
End Sub