Hello AccessWorld,
I have this Function code to play audio file in my Form:
I do this code when the CountDown form is open:
However, when the countdown is over, the sound is still playing... Can i set the play duration according to where i want?
Hoping this is possible, i've searched a lot but not lucky enough to find one...
I have this Function code to play audio file in my Form:
Code:
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal filename As String, ByVal snd_async As Long) As Long
Function Playsound(sWavFile As String)
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If
End Function
I do this code when the CountDown form is open:
Code:
Playsound ("C:\Users\mpc\Music\Downloaded Music\mycount1.wav")
However, when the countdown is over, the sound is still playing... Can i set the play duration according to where i want?
Hoping this is possible, i've searched a lot but not lucky enough to find one...