Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Public Sub PlaySound(ByVal FileName As String)
sndPlaySound(FileName, SND_ASYNC Or SND_NODEFAULT)
End Sub
End Module
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PlaySound("C:\WINDOWS\Application Data\Microsoft\WELCOME\WELCOM98.WAV")
End Sub
____________________________
If you find the answer helpful, please mark this topic as solved.
07-01-2004 at 04:48 PM
|
patriciam Level: Guest
Re: Sound in a form
That function is just for .wav files?I tried with a mp3 file and it doesn't work.