我做了一个MP3播放器,但我不知道怎么实现循环播放!
谁能把WindowMediaPlay空件的有关属性和实现方法给我说说,因为我是刚学VB。
以下是我的程序:
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_Click()
If List1.ListCount = 0 Then
List1.AddItem Dir1.Path & "\" & File1.FileName '增加曲目到列表框
List1.ListIndex = 0
Else
List1.AddItem Dir1.Path & "\" & File1.FileName '增加曲目到列表框
End If
End Sub
Private Sub File1_DblClick()
WindowsMediaPlayer1.URL = Dir1.Path & "\" & File1.FileName '设置播放曲目
WindowsMediaPlayer1.Controls.play '自动播放
End Sub
Private Sub List1_DblClick()
Text1.Text = List1.Text
WindowsMediaPlayer1.Controls.play
WindowsMediaPlayer1.Controls.Next
WindowsMediaPlayer1.URL = List1.Text
End Sub