Private Sub Form_Load()
On Error Resume Next
If App.PrevInstance Then End
If Dir(App.Path & "\tem.txt") <> "" Then
Open App.Path & "\tem.txt" For Input As #1
Do Until EOF(1)
Input #1, a$, B$
Form2.L.AddItem Format(Form2.L.ListCount + 1, "000") & ". " & Trim(a$) '歌名
Form2.List1.AddItem Trim(B$) ' 将文件路径读入 隐藏的播放列表
Loop
Close End If
End Sub以上是加载歌名和路径 用了两个listbox 怎么才能让播放完后自动播放下一首歌呢?
On Error Resume Next
If App.PrevInstance Then End
If Dir(App.Path & "\tem.txt") <> "" Then
Open App.Path & "\tem.txt" For Input As #1
Do Until EOF(1)
Input #1, a$, B$
Form2.L.AddItem Format(Form2.L.ListCount + 1, "000") & ". " & Trim(a$) '歌名
Form2.List1.AddItem Trim(B$) ' 将文件路径读入 隐藏的播放列表
Loop
Close End If
End Sub以上是加载歌名和路径 用了两个listbox 怎么才能让播放完后自动播放下一首歌呢?
If MP.playState = 1 Then
Song = Song + 1: Form2.L.ListIndex = Song
url = Form2.List1.List(Form2.L.ListIndex)
WindowsMediaPlayer1.url = url: WindowsMediaPlayer1.Controls.play
end if
End Sub