How can I play mp3 and wav files in VB?
If someone can give a complete code, I'de will be
very thankful.
Printable View
How can I play mp3 and wav files in VB?
If someone can give a complete code, I'de will be
very thankful.
You can find code for doing that and more at this link:
http://209.207.250.147/showthread.php?threadid=31987
Hope that helps.
OK, but what about WAV?
Code:'Play A sound
'
'API Function to play the sound
'bas module code
Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
'form code
Private Sub Command1_Click()
'Play wav
PlaySound "C:\A Wayne\YourFile.wav", 0&, &H1
End Sub
Private Sub Command2_Click()
'Stop wav
PlaySound "C:\A Wayne\YourFile.wav", 0&, &H4
End Sub