misuser2k7
MIS
I have managed to add music to a splash screen I created.
I want the music to stop when the splash screen closes but this does not happen.
The following is the code for the play sound function ............
Option Compare Database
Declare Function apisndPlaySound Lib "winmm" Alias "sndPlaySoundA" (ByVal filename As String, ByVal snd_async As Long) As Long
Function Playsound(sWavFile As String)
'Purpose: Plays a sound.
'Argument: the fu11 path and file name.
If apisndPlaySound(sWavFile, 1) = 0 Then
MsgBox "The Sound Did Not Play!"
End If
End Function
AND
The following is the procedure that plays the sound when the splash screen opens ........
Private Sub Form_Open(Cancel As Integer)
Playsound ("C:\tunes\longtunes.wav")
End Sub
Is there a way to stop the sound from playing in the code of the 'On Close property?
Private Sub Form_Close()
End Sub