Search code examples
c#fullscreenformborderstyle

How to create a full-screen form with max/min/close button in c#?


I made full-screen by: FormBorderStyle = FormBorderStyle.None; but there is no max/min/close button? How to get it?


Solution

  • Set the WindowState property of your form to Maximized instead of removing the form border if you want a full screen form to retain the controls.

    private void Form1_Shown(object sender, EventArgs e)
    {
        this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
    }
    

    If you actually want a full screen form with no border the best way to do this would likely be a custom user control to emulate the standard min/max/close functions.