-
I need to know the API call that allow you to play Window wave file. I built a message board for the desk top and want it to use the wave file to let user know there is a message posted. I not very good with coding API call yet so I'll need a sample. One wave file is Done.wav
-
Use the sndPlaySound API. Put this code in a module.
Code:
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Place a CommandButton on a Form with this code.
Code:
Private Sub Command1_Click()
Call sndPlaySound("C:\done.wav", &H1)
End Sub
-
ok that works but how do you stop the wav file playing when
you close the program ?
Merlin ?
-
This plays WAV file until it is finished. I'm not sure if you can terminate it but I'll look in to it.