1

使用 WMPLib.WindowsMediaPlayer 我可以播放和暂停 mp3 文件,但我无法从暂停点恢复。

谁能告诉我如何恢复这首歌

谢谢

4

2 回答 2

1

实际上我认为这很容易我使用“Pause”方法暂停歌曲并使用“Play”方法继续它::: 这是我使用过的代码

WMPLib.WindowsMediaPlayer wmp = new WMPLib.WindowsMediaPlayer();
wmp.url="the mp3 path that you want to play";
//NOTE::: after the above command the mp3 file or other multimedia file will automatically play.

//And for PAUSING use this code:
wmp.controls.pause();

//AND for continue PLAYING use below code:
wmp.controls.play();

这段代码对我有用,我希望对你有用。

于 2012-02-22T13:08:27.993 回答
0

解决方案是更换媒体播放器。添加对此播放器的引用:AxWMPLib.AxWindowsMediaPlayer. 我在这个项目中找到了一个参考。

我只是更改了播放器参考。调整属性:这个“ moPlayer.Controls.pause()”变成了“ moPlayer.Ctlcontrols.pause()”,我在做生意。我希望这有帮助。我这样做了,我的播放器可以暂停和恢复。

于 2012-03-07T02:12:23.027 回答