VB 做音乐播放器,播放列表怎么弄?

用VB做了个MP3音乐播放器,但不会弄播放列表,高手请指点能说下代码么?谢谢啦... 用VB 做了个MP3音乐播放器,但不会弄播放列表,高手请指点
能说下代码么? 谢谢啦
展开
 我来答
沙慧月03
2010-07-30 · TA获得超过2157个赞
知道大有可为答主
回答量:2717
采纳率:100%
帮助的人:3615万
展开全部
添加一个file ,按钮,wmp控件,timer(这能制动播放下一首)

Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias _
"SHGetPathFromIDListA" (ByVal pIdl As Long, ByVal pszPath As String) As Long

Private Type BrowseInfo
hwndOwner As Long
piDLroot As Long
pszdisplayName As String
lpsztitle As String
ulFlags As Long
lpfncallback As Long
lParam As Long
iImage As Long
End Type

Private Sub Command1_Click()
Dim bi As BrowseInfo
Dim folderid As Long
Dim pb As String
With bi
.hwndOwner = Me.hWnd
.lpsztitle = "把输出的文件存放到这个文件夹:"
.ulFlags = 3
End With
folderid = SHBrowseForFolder(bi)
If folderid = 0 Then Exit Sub
pb = String$(260, 0)
SHGetPathFromIDList folderid, pb
pb = Left$(pb, InStr(pb, vbNullChar) - 1)
File1.Path = pb
End Sub

Private Sub file1_Click()
WindowsMediaPlayer1.URL = File1.Path & "\" & File1.FileName
Timer1.Interval = 500
End Sub

Private Sub Timer1_Timer()
If WindowsMediaPlayer1.playState = 1 Then
WindowsMediaPlayer1.URL = File1.Path & "\" & File1.List(File1.ListIndex + 1)
If File1.ListCount > File1.ListIndex + 1 Then
File1.ListIndex = File1.ListIndex + 1
End If
End If
End Sub
百度网友9260c4507
2010-07-19 · TA获得超过2328个赞
知道大有可为答主
回答量:3736
采纳率:0%
帮助的人:2408万
展开全部
list控件
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式