bool WindowsStateMax = false; int playerUICount = 0; private void axWindowsMediaPlayer1_DoubleClickEvent_1(object sender, AxWMPLib._WMPOCXEvents_DoubleClickEvent e) { if (WindowsStateMax == false) { this.WindowState = FormWindowState.Maximized; axWindowsMediaPlayer1.Dock = DockStyle.Fill; axWindowsMediaPlayer1.uiMode = "none"; WindowsStateMax = true; } else if (WindowsStateMax == true) { this.WindowState = FormWindowState.Normal; axWindowsMediaPlayer1.Dock = DockStyle.None; axWindowsMediaPlayer1.uiMode = "none"; WindowsStateMax = false; } } private void axWindowsMediaPlayer1_MouseMoveEvent(object sender, AxWMPLib._WMPOCXEvents_MouseMoveEvent e) { if (WindowsStateMax == true) { axWindowsMediaPlayer1.uiMode = "full"; timerPlayerUI.Start(); playerUICount = 0; } else { // do nothing } } private void timerPlayerUI_Tick(object sender, EventArgs e) { playerUICount++; if(playerUICount==30) { axWindowsMediaPlayer1.uiMode = "none"; playerUICount = 0; timerPlayerUI.Stop(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)