I have a WinForms app that I am trying to make full screen (somewhat like what VS does in full screen mode).
Currently I am setting FormBorderStyle
to <
You can use the following code to fit your system screen and task bar is visible.
private void Form1_Load(object sender, EventArgs e)
{
// hide max,min and close button at top right of Window
this.FormBorderStyle = FormBorderStyle.None;
// fill the screen
this.Bounds = Screen.PrimaryScreen.Bounds;
}
No need to use:
this.TopMost = true;
That line interferes with alt+tab
to switch to other application. ("TopMost" means the window stays on top of other windows, unless they are also marked "TopMost".)