vb中WMP怎样全部循环

PrivateSubCommand1_Click()WindowsMediaPlayer1.URL=List1.list(List1.ListIndex)Timer1.E... Private Sub Command1_Click()
WindowsMediaPlayer1.URL = List1.list(List1.ListIndex)
Timer1.Enabled = True
End Sub

Private Sub Command2_Click()
Form2.Hide
Form3.Hide
Form1.Show
End Sub

Private Sub Form_Load()
Dim a()
Form1.AutoRedraw = True
File1.Path = "D:\新年音乐"
File1.Pattern = "*.mp3;*.wma"
ReDim a(0 To File1.ListCount - 1)

For i = 0 To File1.ListCount - 1
a(i) = File1.Path & "\" & File1.list(i)
List1.AddItem a(i)
Next

List1.ListIndex = 0
End Sub

Private Sub Timer1_Timer()
If List1.ListIndex = List1.ListCount - 1 Then Exit Sub
If WindowsMediaPlayer1.playState = wmppsStopped Then
List1.ListIndex = List1.ListIndex + 1
Command1_Click
End If
End Sub

我想让LIST里的歌曲全部循环
展开
 我来答
tianqing20wen

2012-01-09 · TA获得超过2.4万个赞
知道大有可为答主
回答量:8226
采纳率:88%
帮助的人:5109万
展开全部
Private Sub Timer1_Timer()
If WindowsMediaPlayer1.playState = wmppsStopped Then
If List1.ListIndex = List1.ListCount - 1 Then
List1.ListIndex = 0
Else
List1.ListIndex = List1.ListIndex + 1
End If
Timer1.Enabled = False
Command1_Click
End If
End Sub
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式