Exemplo n.º 1
0
        public void ResetFullScreen()
        {
            if (fullScreen)
            {
                // reset full screen
                // reset the normal WinForm properties
                // always set WinForm.Visible to false to avoid site effect
                form.Visible         = false;
                form.WindowState     = windowState;
                form.FormBorderStyle = borderStyle;
                form.Bounds          = bounds;

                HandleTaskBar.showTaskBar();

                form.Visible = true;

                // Not in full screen mode
                fullScreen = false;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Show or hide full screen mode
        /// </summary>
        public void ShowFullScreen()
        {
            // set full screen
            if (!fullScreen)
            {
                // Get the WinForm properties
                borderStyle = form.FormBorderStyle;
                bounds      = form.Bounds;
                windowState = form.WindowState;

                // set to false to avoid site effect
                form.Visible = false;

                HandleTaskBar.hideTaskBar();

                // set new properties
                form.FormBorderStyle = FormBorderStyle.None;
                form.WindowState     = FormWindowState.Maximized;

                form.Visible = true;
                fullScreen   = true;
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// You can use this to reset the Taskbar in case of error.
 /// I don't want to handle exception in this class.
 /// You can change it if you like!
 /// </summary>
 public void ResetTaskBar()
 {
     HandleTaskBar.showTaskBar();
 }