Click here to Skip to main content
15,922,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have write following code in order to show media player control on mouse move event but when i double click to make it in full screen mode it show uiMode="fill" type controls and nothing happens on mouse move...


C#
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();
                }
        }


what's wrong with above code???
Posted
Updated 23-Jun-13 22:18pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900