VB中如何实现连续播方多个声音文件?
如题。我想在VB中实现:单击一下command1,就自动播放1.wav,2.wav,3.wav。我想用mmcontrol控件来做,请问应该如何操作,谢谢为什么这样只能播放...
如题。我想在VB中实现:单击一下command1,就自动播放1.wav,2.wav,3.wav。 我想用mmcontrol控件来做,请问应该如何操作,谢谢
为什么这样只能播放最后一个文件呢?
MMControl1.FileName =app.path & "1.wav" MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
MMControl1.FileName =app.path & "2.wav" MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
MMControl1.FileName =app.path & "3.wav" MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
能讲具体点么?我不仅是个新手,而且我还是个外行 展开
为什么这样只能播放最后一个文件呢?
MMControl1.FileName =app.path & "1.wav" MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
MMControl1.FileName =app.path & "2.wav" MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
MMControl1.FileName =app.path & "3.wav" MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
能讲具体点么?我不仅是个新手,而且我还是个外行 展开
展开全部
Dim i As String
Private Sub Command1_Click()
MMControl1.FileName = "C:\WINDOWS\Media\Windows XP 注销音.wav"
MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
End Sub
Private Sub Form_Load()
i = 0
End Sub
Private Sub MMControl1_Done(NotifyCode As Integer)
i = i + 1
MMControl1.Command = "Close"
Select Case i
Case 1
MMControl1.FileName = "C:\WINDOWS\Media\Windows XP 启动.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
Case 2
MMControl1.FileName = "C:\WINDOWS\Media\Windows XP 关机.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Select
End Sub
Private Sub Command1_Click()
MMControl1.FileName = "C:\WINDOWS\Media\Windows XP 注销音.wav"
MMControl1.Command = "Open"
MMControl1.UpdateInterval = 1000
MMControl1.Command = "Play"
End Sub
Private Sub Form_Load()
i = 0
End Sub
Private Sub MMControl1_Done(NotifyCode As Integer)
i = i + 1
MMControl1.Command = "Close"
Select Case i
Case 1
MMControl1.FileName = "C:\WINDOWS\Media\Windows XP 启动.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
Case 2
MMControl1.FileName = "C:\WINDOWS\Media\Windows XP 关机.wav"
MMControl1.Command = "Open"
MMControl1.Command = "Play"
End Select
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询