Operating a wav file from VB.
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
I want to operate a wav file by pressing the space bar on the keyboard. How can I do this action ?? Thank you !! Ahuva
From MSDN,
'This function declaration must be entered onto a single line.
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" _
(ByVal lpszSoundName As String, ByVal uFlags As Long) As LongSub PlaySound()
If Application.CanPlaySounds Then
'Substitute the path and filename of the sound you want to play
Call sndPlaySound32("c:\windows\media\chimes.wav", 0)
End If
End SubMichael :-)