-
I'm pretty poor when it comes to VB, so if anyone can give me any (REALLY) basic instructions on how to play a *.wav file after an event occurs, it would be really helpful.
I tried what Dim suggested:
Shell("C:\mywave.wav")
but VB protested with
"Invalid procedure call or arguement"
btw, I am using VB 5.0 Enterprise (not by choice, it's for a school project)
[Edited by SOUL-JAH on 07-17-2000 at 01:43 AM]
-
hehe i knew that woudn't work...here i'm 90% sure this will
Code:
'In Gen Decler.
Private Declare Function Playwave Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long
Private Sub Command1_Click()
F = Playwave("C:\abort.wav", 1)
End Sub
gl, D!m
[Edited by Dim on 07-17-2000 at 01:52 AM]
-
You trying to play a wav file? Refer to this thread: http://forums.vb-world.net/showthrea...threadid=23098
Hope that helps.
-
Use PlaySound
You should use PlaySound which is the successor to sndPlaySound.
Code:
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwFlags As Long) As Long
Private Sub Command1_Click()
'Play the WAV
PlaySound "C:\MyFile.wav", 0&, &H1
End Sub