pritam6012
New member
- Joined
- Jul 9, 2012
- Messages
- 1
- Programming Experience
- Beginner
I am trying to play multiple sounds in vb.net, but unable to play. Only the last file is played. i.e. "2.wav"
When debugged, both "1.wav" & "2.wav" is playing. But in normal mode, only the last file is played.
I wrote the following code.
When debugged, both "1.wav" & "2.wav" is playing. But in normal mode, only the last file is played.
I wrote the following code.
VB.NET:
Public Class Form1
Dim sound As New System.Media.SoundPlayer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
sound.SoundLocation = "C:\sound\1.wav"
sound.Play()
sound.SoundLocation = "C:\sound\2.wav"
sound.Play()
End Sub
End Class