axWindowsMediaPlayer的播放状态
来源:互联网 发布:设计二维码的软件 编辑:程序博客网 时间:2024/05/21 07:33
Examples
The following example demonstrates an event handler for the PlayStateChange Event that displays the current play state in a label. The AxWMPLib.AxWindowsMediaPlayer object is represented by the variable named player.
// Add a delegate for the PlayStateChange event.player.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(player_PlayStateChange);private void player_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e){ // Test the current state of the player and display a message for each state. switch (e.newState) { case 0: // Undefined currentStateLabel.Text = "Undefined"; break; case 1: // Stopped currentStateLabel.Text = "Stopped"; break; case 2: // Paused currentStateLabel.Text = "Paused"; break; case 3: // Playing currentStateLabel.Text = "Playing"; break; case 4: // ScanForward currentStateLabel.Text = "ScanForward"; break; case 5: // ScanReverse currentStateLabel.Text = "ScanReverse"; break; case 6: // Buffering currentStateLabel.Text = "Buffering"; break; case 7: // Waiting currentStateLabel.Text = "Waiting"; break; case 8: // MediaEnded currentStateLabel.Text = "MediaEnded"; break; case 9: // Transitioning currentStateLabel.Text = "Transitioning"; break; case 10: // Ready currentStateLabel.Text = "Ready"; break; case 11: // Reconnecting currentStateLabel.Text = "Reconnecting"; break; case 12: // Last currentStateLabel.Text = "Last"; break; default: currentStateLabel.Text = ("Unknown State: " + e.newState.ToString()); break; }}
- axWindowsMediaPlayer的播放状态
- axWindowsMediaPlayer控件循环播放方法
- C# axWindowsMediaPlayer制作播放器
- AxWindowsMediaPlayer播放后自动全屏
- AxWindowsMediaPlayer控件的使用方法
- AxWindowsMediaPlayer控件的属性
- AxWindowsMediaPlayer的详细用法
- AxWindowsMediaPlayer控件的使用
- AxWindowsMediaPlayer控件的使用方法
- axWindowsMediaPlayer的详细参数。
- AxWindowsMediaPlayer的详细用法
- AxWindowsMediaPlayer的详细用法
- AxWindowsMediaPlayer的详细用法
- AxWindowsMediaPlayer的用法详细
- AxWindowsMediaPlayer的详细用法
- AxWindowsMediaPlayer的详细用法
- AxWindowsMediaPlayer的详细用法
- windows player![转载]C# axWindowsMediaPlayer制作播放器 winform
- 字符串按ACSII码排序
- [转载]C#实现的可复用Socket接收/发送共享缓冲区类
- ABAP--关于文件操作
- Java中sleep()与wait()的区别
- setsockopt :SO_LINGER 选项设置
- axWindowsMediaPlayer的播放状态
- Linux内核线程编程方法
- android:layout_gravity 和 android:gravity 的区别
- java.io.StreamCorruptedException: invalid type code: AC
- Java 下载网络图片
- JSP Servlet编码问题总结
- WindowManager.LayoutParams详解
- ABAP--如何获取ABAP的程序事件顺序的调用堆栈 .
- 雅虎面试题-你真的了解HTML吗?