by revega (5 Submissions)
Category: Sound/MP3
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 12th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Plays WAV file in VB5. This works and it's easy to understand.
' put a MMControl on your form.
' (P.S.: make it visible=false so ya dont have to look at it)
'
'Put this in a button or Form_load. This plays automatically.
' If you DON'T want it to play automatically then
' remove the line
'MMControl1.Command = "Play"
'and then you can use the play button to play the wav.
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.DeviceType = "WaveAudio"
MMControl1.filename = "c:\bee.wav" 'Your file / path
MMControl1.Command = "Open" 'this opens the MMControl
MMControl1.Command = "Play" 'this makes it play
'You can controll MMControl/system with this:
'MMControl1.Command = "your command"
'
'have phun :)
'-revega