Showing posts with label Media state. Show all posts
Showing posts with label Media state. Show all posts

Tuesday, November 20, 2012

how to check the state of media in window media player in .Net/C#


   axWindowsMediaPlayer1.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(axWindowsMediaPlayer1_PlayStateChange);

  void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
        {
            if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsStopped)
            {
                 // Your code
            }
        }