Use the sndPlaySound API. Put the following code in a module.
Now add this code to the Form's Initialize eventCode:Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Code:Private Sub Form_Initialize() Call sndPlaySound("C:\MyaveFile.wav", &H1) End Sub




Reply With Quote