ImageVerifierCode 换一换
格式:DOCX , 页数:20 ,大小:232.15KB ,
资源ID:21653652      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/21653652.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(音乐播放器VB编程源代码Word格式.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

音乐播放器VB编程源代码Word格式.docx

1、Private Sub Form_Load()初始化Form1.Height = 7800w = Falseallloop.Checked = Falserule.Checked = TrueLabel2.Caption = 00:00第一次打开时创建文件If Dir(filepath.text) = And Dir(C:music.txt ThenOpen filepath.txt For Output As #1Close #1 For Output As #2Close #2End If读取文件 For Input As #1 For Input As #2Do While Not EO

2、F(1) Input #1, X Input #2, Y If Dir(X) List1.AddItem (List1.ListCount + 1) &. & Y Call WMP1.currentPlaylist.insertItem(WMP1.currentPlaylist.Count, WMP1.newMedia(X) End IfLoopIf List1.ListCount List1.Width - 430 Thenw = TruePrivate Sub List1_MouseMove(Button As Integer, Shift As Integer, X As Single,

3、 Y As Single)伸缩播放列表 List1.Width - 430 And X 1500 And X 5800 ThenList1.Width = XPrivate Sub List1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)Private Sub List1_Scroll()Private Sub oneloop_Click()单曲循环oneloop.Checked = TrueTimer3.Enabled = TruePrivate Sub Pc13_MouseDown(Button

4、 As Integer, Shift As Integer, X As Single, Y As Single)播放进度控制If WMP1.playState = wmppsPlaying ThenWMP1.Controls.currentPosition = WMP1.currentMedia.duration * X / 233Pc13.ClsPc13.PaintPicture Pc14.Picture, 0, 0, 233, 17, 234 - X, 0, 233, 17Private Sub Picture1_MouseMove(Button As Integer, Shift As

5、Integer, X As Single, Y As Single)切换图片If t = 0 Then Picture3(0).PaintPicture Picture2(0).Picture, 0, 0, 114, 52, 0, 0, 114, 52If t = 1 Then Picture3(0).PaintPicture Picture2(1).Picture, 0, 0, 114, 52, 0, 0, 114, 52Private Sub Picture10_Click()打开搜索窗体Form2.ShowPrivate Sub Picture11_Click()设置静音sd1.Valu

6、e = 0Picture11.PaintPicture Picture12.Picture, 0, 0, 19, 23, 38, 0, 19, 23Private Sub Picture3_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)If Index = 0 ThenIf a = True Then Call WMP1.Controls.pause 播放 Else Call WMP1.Controls.play 暂停If Index = 3 Thenp = 1

7、Call WMP1.Controls.Next 下一首p = 0If Index = 2 ThenCall WMP1.Controls.previous 上一首If Index = 4 Then Call WMP1.Controls.stop 停止播放打开音乐文件If Index = 1 ThenCommonDialog1.DialogTitle = 打开音乐文件CommonDialog1.Filter = mp3|*.mp3|wma|*.wmaCommonDialog1.InitDir = D:CommonDialog1.ShowOpenfname = CommonDialog1.FileT

8、itlegname = CommonDialog1.FileNameIf fname n = Len(fname) For i = 0 To List1.ListCount - 1 If Right(List1.List(i), n - 4) = Left(fname, n - 4) Then Call WMP1.Controls.playItem(WMP1.currentPlaylist.Item(i) 播放添加后的歌曲 Timer1.Enabled = True List1.ListIndex = i Exit Sub Next Left(fname, n - 4) 歌曲无重复则添加到播放

9、列表,否则不再添加 Call WMP1.currentPlaylist.insertItem(WMP1.currentPlaylist.Count, WMP1.newMedia(gname) List1.ListIndex = List1.ListCount - 1 List1.Selected(i) = True Call WMP1.Controls.playItem(WMP1.currentPlaylist.Item(List1.ListIndex)Private Sub Picture3_MouseMove(Index As Integer, Button As Integer, Shi

10、ft As Integer, X As Single, Y As Single)根据不同情况切换图片,实现动态按钮功能 If X 80 Or Y 48 Then Picture3(0).PaintPicture Picture2(0).Picture, 0, 0, 114, 52, 228, 0, 114, 52 Picture3(0).PaintPicture Picture2(1).Picture, 0, 0, 114, 52, 228, 0, 114, 52 55 Or Y Picture3(1).PaintPicture Picture2(2).Picture, 0, 0, 60, 5

11、2, 0, 0, 60, 52 Picture3(1).PaintPicture Picture2(2).Picture, 0, 0, 60, 52, 60, 0, 60, 52 65 Or Y Picture3(2).PaintPicture Picture2(3).Picture, 0, 0, 83, 52, 0, 0, 83, 52 Picture3(2).PaintPicture Picture2(3).Picture, 0, 0, 83, 52, 83, 0, 83, 52 Picture3(3).PaintPicture Picture2(4).Picture, 0, 0, 83,

12、 52, 0, 0, 83, 52 Picture3(3).PaintPicture Picture2(4).Picture, 0, 0, 83, 52, 166, 0, 83, 52If Index = 4 Then Picture3(4).PaintPicture Picture2(5).Picture, 0, 0, 60, 52, 0, 0, 60, 52 Picture3(4).PaintPicture Picture2(5).Picture, 0, 0, 60, 52, 120, 0, 60, 52Private Sub Picture4_MouseMove(Button As In

13、teger, Shift As Integer, X As Single, Y As Single)图片切换Private Sub Picture5_Click()显示或隐藏播放列表If b = 0 ThenForm1.Width = 5940Form1.Height = 3900b = 1Picture5.ToolTipText = 显示播放列表b = 0隐藏播放列表Private Sub Picture6_Click()最小化窗体Form1.WindowState = 1Private Sub Picture7_Click()关闭窗体之前保存播放列表数据 n = InStr(List1.L

14、ist(i), ) Write #1, WMP1.currentPlaylist.Item(i).sourceURL Write #2, Mid(List1.List(i), n + 1)EndPrivate Sub Picture8_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)播放模式设置菜单PopupMenu menusetPrivate Sub Picture9_Click()删除菜单PopupMenu gclearPrivate Sub rand_Click()随机播放rand.Checke

15、d = TruePrivate Sub rule_Click()顺序播放, False)Private Sub sd1_Change()音量控制条WMP1.settings.volume = sd1.Valuesd1.ToolTipText = 音量 sd1.Value &%If sd1.Value = 0 Then sd1.ToolTipText = 静音If sd1.Value = 100 Then sd1.ToolTipText = 最大音量If sd1.Value 0 ThenPrivate Sub select_Click()删除选中项For i = 0 To List1.ListC

16、ount - 1 If List1.Selected(i) Then List1.RemoveItem (i) m = i Call WMP1.currentPlaylist.RemoveItem(WMP1.currentPlaylist.Item(i) Exit ForNext List1.List(i) = (i + 1) & Mid(List1.List(i), n + 1)If List1.ListCount = 0 Then Exit SubIf List1.ListCount = m ThenList1.Selected(m - 1) = TrueList1.Selected(m) = TruePrivate Sub Timer1_Timer()更新播放动态If WMP1.currentPlaylist.Count If WMP1.playState = 3 ThenLabel2.Caption = WMP1.Controls.currentPositionString a = True t = 1 Picture3(0).ToolTipText = 播放 a = False

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1