Search code examples
c#winformsautoresizewindow-resizeminimize

.Net WinForms - Remove Close, Resize and Minimize Button


My application layout is defined with a top menu and a content area below.

In the content area I use to load the action form in a panel by adding them as a control.

First question is: is it ok as approach?

Second question: Now the forms are loaded in the content panel with Maximize, Resize and Minimize Button. How can I remove them?

Thanks


Solution

  • Set your Form ControlBox property to False.

    See: Form.ControlBox Property

    To set it in the designer, go to form properties and set ControlBox to false.

    enter image description here

    This is how it would look after that:

    enter image description here

    For your first question:

    is it ok as approach?

    That depends on your requirement. As long as you have provided your user a way to exit from the application and it is easily accessible, it should be fine, IMO.