版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、VB Mp3播放器源代码.txt13母爱是迷惘时苦口婆心的规劝;母爱是远行时一声殷切的叮咛;母爱是孤苦无助时慈祥的微笑。public class form1dim soundname as string(dim i as integerdim j,l as booleandim k as integerdim filename as string '取歌曲的名字dim path as string(dim s,m as integerdim luj as stringdim count as integer '有来声明选择歌曲的数目i=0j=falsel=falselabel2
2、.text="歌曲名:"label3.text="歌曲演唱者:"label4.text="歌曲描述:"label5.text="歌曲类型:"label6.text="歌曲大小:"end subselectsound(end subend subif timer1.enabled=false thentimer1.enabled=trueelsetimer1.enabled=falseend ifif i=0 thenme.axwindowsmediaplayer1.ctlcontrols.pau
3、se(i=1button3.text="继续"exit subend ifif i=1 thenme.axwindowsmediaplayer1.ctlcontrols.play(button3.text="暂停"i=0exit subend ifend subdim stringl1,ss,sss as stringstring1=listbox1.selecteditem.tostring.substring(listbox1.selecteditem.tostring. lastindexof(""+1filename=stri
4、ng1.substring(0,string.lastindexof("."luj=listbox1.selecteditem.tostring.substring(0,listbox1.selecteditem.tostring.la stindexof("."+".lrc"me.labe1.text=ssif dir(luj<>nothing thensss=fr.readline'我们读取的第一行歌词while(sss<>""if (sss.lastindexof(ss <
5、;> -1then '时间匹配了歌词中的时间me.textbox1.text=sss.substring(sss.lastindexof(""+1end ifend whileelsetextbox1.text="Not Find!请从网上下载歌词!"form2.textbox1.text="Not Find!请从网上下载歌词!"end ifend subme.axwindowsmediaplayer1.ctlcontrols.currentposition=me.hscrollbar1.value/1000*mend
6、submeaxwindowsmediaplayer1.ctlcontrols.fastforward(end subme.axwindowsmediaplayer1.ctlcontrols.play(label2.text="歌曲名:"+me.axwindowsmediaplayer1.currentmedia.getiteminfo("title" label3.text="歌曲演唱者: "+me.axwindowsmediaplayer1.currentmediagetitemino("author"label
7、4.text="歌曲描述: "+me.axwindowsmediaplayer1.currentmedia.getteminfo("description"label5.text="歌曲类型: "+me.axwindowsmediaplayer1.currentmedia.getiteminfo("filesize"timer1.start(end subprivate sub playsound(timer1.stop(if j=false thenelseif j=true thenme.axwindowsme
8、diaplayer1.url=listbox1.items(kj=falseend iflistbox1.selectedindex=kme.axwindowsmediaplayer1.cttcontrols.play(label2.text="歌曲名:"+me.axwindowsmediaplayer1.currentmedia.getiteminfo("title" label3.text="歌曲演唱者: "+me.windowsmediaplayer1.currentmedia.getiteminfo("author&
9、quot;label4.text="歌曲描述: "+me.axwindowsmediaplayer1.currentmedia.getiteminfo("descrition"label5.text="歌曲类型: "+me.axwindowsmediaplayer1.currentmedia.getiteminfo("filetype"label6.text="歌曲大小: "+me.axwindowsmediaplayer1.currentmedia.getiteminfo("file
10、size"timer1.start(end subprivate sub selectsound(dim open as new openfiledialogdim i as integerwith open.filter="所有mp3文件(*.mp3|*.mp3|所有wma文件(*.wma|*.wma".multiselect=true.title="请选择歌曲"end withfor i=0 to soundname.getupperbound(0listbox1.items.add(soundname(inextlistbox1.sele
11、ctedindex=0end ifend subaxwindowsmediaplayer1.playstate=wmplib.wmplaystate.wmppsmediaended thenj=truetimer2.start(end ifend subplaysound(tier2.stop(end subtimer1.stop(if listbox1.selectedindex=0 thenelseend ifme.axwindowsmediaplay1.ctlconrols.play(label2.text="歌曲名:"+me.axwindowsmediaplayer
12、1.currentmedia.getiteminfo("title"label3.text="歌曲演唱者: "+me.axwindowsmediaplayer1.currentmedia.getiteminfo("author"label4.text="歌曲描述: "+me.axwindowsmediaplayer1.currentmedia.getiteminfo("description"label5.text="歌曲类型: "+me.axwindowsmediaplayer1.cur
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年智能药箱定时提醒与用药管理功能应用
- 护理管理的职业发展
- 2026年地下管线事故应急响应机制:外力破坏事故降幅超92%的北京经验
- 2026年柔性夹爪选型四步法需求建模参数对比实测验证成本优化
- 2026年整车检修能力625辆 年的产线规划与能力提升
- 2026年超大规模智算集群建设提升智能算力高质量供给技术方案
- 2026年网络安全数据保护
- 2026年太极拳入门教程养生课件
- 2026年实验室生物安全柜使用培训
- 2026年上班族养生保健操课件
- 2026年浙江纺织服装职业技术学院高职单招职业适应性测试参考题库带答案解析
- 医院应急应对培训课件
- 2026年辽宁生态工程职业学院单招职业技能测试题库附答案
- 医疗服务窗口人员接待技巧
- 企业管理-云仓储公司组织架构图及各岗位职责SOP
- 虎门销烟课件思品
- 汽车空调 第2版 课件 项目5 汽车空调系统制冷剂回收与加注
- 氢气事故案例
- DB22∕T 3645-2024 水稻有序机抛秧技术规程
- 消防报警主机操作培训
- 二位数乘一位数乘法练习题(1000道-A4直接打印)
评论
0/150
提交评论