Making sound

  • Thread starter Thread starter joe
  • Start date Start date
Hi,

You have to use the API to do it.

Declares
Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _

(ByVal lpszSoundName As String, ByVal uFlags As Integer) As Integer

Const SND_ASYNC = &H1 ' play asynchronously



To use

sndPlaySound("C:\windows\media\notify.wav", SND_ASYNC)



Ken
 
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Beep()

End Sub

Kevin
 
Back
Top