如何在列表框中选择和播放下一首被视为播放列表的歌曲 [英] how to select and play next song in listbox considered as playlist

查看:116
本文介绍了如何在列表框中选择和播放下一首被视为播放列表的歌曲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友我正在使用媒体播放器控制在vb 2008中创建mp3播放器,我可以在第一首歌完成后自动启动下一首歌,非常非常.....非常感谢回复!

Hi friends I am creating mp3 player in vb 2008 using media player control, How I can autometically start next song after first song finished ,will very very..... Thankful for reply!

推荐答案

为播放器控件的PlayStateChange事件添加一个事件,并检查 e.state


当这个停止时( state = 1 )(fyi播放状态= 3)然后只需重复你的播放列表并加载下一首曲目并发出播放命令。



还有其他几种状态,如果你做 debug.writeline(e.state) 如果你加载,播放和停止播放歌曲,你可以看到这些。







而不是去重写一堆代码,请参阅 http://www.devasp.net /net/articles/display/304.html [ ^ ]



你应该可以从那里开始工作。
Add an event for the PlayStateChange event of the player control and check the state of e.state

When this is stopped (state = 1) (fyi playing state = 3) then just iterate your playlist and load the next track and issue a play command.

there are several other states also, if you do a debug.writeline(e.state) you can watch these occur if you load and play and stop a song.



Rather than go and rewrite a bunch of code, see http://www.devasp.net/net/articles/display/304.html[^]

and you should be able to work it from that.


这篇关于如何在列表框中选择和播放下一首被视为播放列表的歌曲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆