I have ax windows media player in my windows forms application. When the user double clicks on it, it becomes full screen.
PROBLEM: I want the user to be able to go back to normal screen when he presses the "escape key". I have put a keydown event on the ax media player. This key down event works when in normal mode, but fails when the media player is made full screen.
WMPLarge.KeyDownEvent += new AxWMPLib._WMPOCXEvents_KeyDownEventHandler(Form1_KeyDown);
private void Form1_KeyDown(object sender, AxWMPLib._WMPOCXEvents_KeyDownEvent e)
{
if (e.nKeyCode == 27)
{
MessageBox.Show("");
WMPLarge.fullScreen = false;
WMPSmall.fullScreen = false;
}
}
How can I achieve this ?