C# AxWindowsMediaPlayer

AxWMPLib.AxWindowsMediaPlayer winPlayer = new AxWMPLib.AxWindowsMediaPlayer();
winPlayer.Dock = DockStyle.Fill;

winPlayer.BeginInit();
panel1.Controls.Add(winPlayer);
winPlayer.EndInit();

//循环播放
winPlayer.settings.setMode("loop", true);
//右键axWindowsMediaPlayer1--属性--常规--控件布局--选择模式--None
winPlayer.uiMode = "none";
//能用快捷键
winPlayer.enableContextMenu = false;
//控件能用
winPlayer.Ctlenabled = false;

winPlayer.URL = System.IO.Directory.GetCurrentDirectory()+@"/1.wmv";
winPlayer.Ctlcontrols.play();

 

类库下载:http://download.csdn.net/detail/tianciliangen/9497732

 

 

相关文档:

http://blog.csdn.net/brouse8079/article/details/1829885

http://www.cnblogs.com/Garden-blog/archive/2011/04/15/2017362.html

posted @ 2016-04-21 10:31  天王星天  阅读(1906)  评论(0编辑  收藏  举报