Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to continue program execution while MMControl1 plays sound 1

Status
Not open for further replies.

dan

MIS
Oct 7, 1998
298
0
16
US
I am using the code below. The problem is the program stops execution until the sound is finished. How can I have the sound play in the background and execution continue?
Dan

Main program:
.
.
SoundName = "SoundToPlay.wav"
Play
.
. (next command waits till sound finishes)
.
End Sub

Private Sub Play()
MMControl1.FileName = App.Path & "\" & SoundName
MMControl1.Command = "Sound"
End Sub


Public Sub Form_Load()
MMControl1.Notify = False
MMControl1.Wait = False
MMControl1.Shareable = False
MMControl1.DeviceType = "WaveAudio"
MMControl1.FileName = App.Path & "\default.wav"
MMControl1.Command = "Open"
End Sub

Thanks in advance.
Dan
 
>MMControl1.Wait = False

You need to set this before every .Command; it only persists for a single command, and is then ignored. This is documented behaviour.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top