QuantumMindsLogo
Back to top

Better Browsers:

NEXT PREVIOUS

Windows Media Player - Playstate C#

November 12, 2011

So I was trying to close a windows form when the Windows Media Player object stopped
playing. I tried some code such as:

However, this didn't work because there was no event attached to windows media player.
To handle this problem try the following code...
First add this to the designer generated code to add the event handler function:


After that add this function to server form.cs which will get called upon event trigger:




NEXT PREVIOUS


Add Comment:





COMMENTS


Anon wrote on November 12, 2011:

Thank you for this tutorial

Stan wrote on November 12, 2011:

Thank you! I was exactly trying to achieve this.

States? wrote on November 12, 2011:

What other states are there?

You wrote on November 12, 2011:

I like your style ;)

Kaan wrote on November 13, 2011:

Thank you :)

You wrote on November 13, 2011:

you`re welcome