1 2 3 4 5 6 7 8 9 10 11 12 13 14
| 'Gestion des sons
Private Path As String = "" & My.Computer.FileSystem.CurrentDirectory & "\sons\"
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpszCommand As String, ByVal lpszReturnString As String, ByVal cchReturn As Integer, ByVal hwndCallback As Integer) As Integer
Private Sub test_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
mciSendString("open " & Path & "Connect.wav alias connect", "", 0, 0)
mciSendString("open " & Path & "Deconnexion.wav alias disconnect", "", 0, 0)
End Sub
Private Sub Button9_Click(sender As System.Object, e As System.EventArgs) Handles Button9.Click
mciSendString("play connect", "", 0, 0)
End Sub
Private Sub Button10_Click(sender As System.Object, e As System.EventArgs) Handles Button10.Click
mciSendString("play disconnect", "", 0, 0)
End Sub |
Partager