There is a program window, there is a button in it that puts the program window in full-screen mode. When you press Esc, the program is transferred to windowed mode. Everything is done as in the documentation. When you press the button:
this.FormBorderStyle = FormBorderStyle.None; this.WindowState = FormWindowState.Maximized; this.TopMost = true;
When you press Esc:
this.FormBorderStyle = FormBorderStyle.Sizable; this.WindowState = FormWindowState.Normal; this.TopMost = false;
I will say right away that everything works, but there is 1 problem. When I transfer to full-screen mode from the window state - everything is fine, the program covers the entire screen along with the Start menu. When I translate into full-screen mode from an expanded state, the program cannot hide the Start menu and eventually shifts up. Of course, I could use WinApi to set a command to hide the start menu. But just if everything from the window is normal, why is it not happening from the deployed? Tell me what the problem is?
WindowState
already equal toFormWindowState.Maximized
, so this part may not work as well. Maybe try to change it toNormal
and then again toMaximized
? - VladD