加入drive,file,dir控件,1个label,两个按钮,一个wmp控件(自带有音量控制,进度条)
Private Sub Command1_Click()
File1.ListIndex = File1.ListIndex + 1
File1_Click
End Sub
Private Sub Command2_Click()
File1.ListIndex = File1.ListIndex -1
File1_Click
End Sub
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 File1.ListCount > 0 Then
If Right(Dir1.Path, 1) <> "\" Then
Label1.Caption = Dir1.Path & "\" & File1.FileName
WindowsMediaPlayer1.URL = Label1.Caption
End If
Else
Label1.Caption = Dir1.Path & file.FileName
End If
End Sub
温馨提示:内容为网友见解,仅供参考