循环播放:axWindowsMediaPlayer1.settings.setMode("loop", true);
取消循环:axWindowsMediaPlayer1.settings.setMode("loop", false);
获取媒体文件的播放时间:
string url = "D:\test.wmv";
WMPLib.WindowsMediaPlayerClass mpc = new WMPLib.WindowsMediaPlayerClass();
WMPLib.IWMPMedia mp = mpc.newMedia(url);
double duration = mp.duration;
WMPLib.WindowsMediaPlayerClass mpc = new WMPLib.WindowsMediaPlayerClass();
WMPLib.IWMPMedia mp = mpc.newMedia(url);
double duration = mp.duration;