Click here to Skip to main content
15,867,999 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I set
private Video MyVideo=null;
.......(Omit some of the irrelevant)
MyVideo.Owner = panel1;
I want to play full screen by double-clicking to play goal, so with panel1_MouseDoubleClick () function to achieve, but in a real play, panel1 double-click event has been impossible, it maybe covered by video.
How we can achieve double-screen video playback to achieve the purpose of full screen?
Thanks.
Posted

1 solution

try this way
C#
public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            panel1.Dock = DockStyle.Fill;
        }

        private void panel1_DoubleClick(object sender, EventArgs e)
        {
            if (this.WindowState != FormWindowState.Maximized)
            {
                this.WindowState = FormWindowState.Maximized;
                this.FormBorderStyle = FormBorderStyle.None;
            }
            else
            {
                this.WindowState = FormWindowState.Normal;
                this.FormBorderStyle = FormBorderStyle.Fixed3D;
            }
        }
    }
 
Share this answer
 
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