Does anyone know how to get a message back from Winmm/MCI when a sound has completed play?
Printable View
Does anyone know how to get a message back from Winmm/MCI when a sound has completed play?
How are you getting the sound to play?
Sometimes like the following:
Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Const SND_ASYNC = &H1
Private Sub Command1_Click()
sndPlaySound "C:\Files\Sound1.wav", SND_ASYNC
sndPlaySound "C:\Files\Sound2.wav", SND_ASYNC
End Sub
...or
Sometimes I use an ActiveX control that will give me notification, but the distribution license on the control is expensive. So I'd rather use the MCI without the cost of the control.
Thanks!
Just out of curiosity, why are you not using the multimedia control built into VB? It returns notification when it is done.