42

In order to make a form non-resizable I have set MaximumSize and MinimumSize to the same value.

The problem I have is that when the user points to the border of the form, the mouse pointer changes so that it look as though the form is resizable. Is is possible for this not to happen?

Craig Johnston
  • 7,467
  • 16
  • 40
  • 47
  • 4
    possible duplicate of [Prevent users from resizing the window/form size](http://stackoverflow.com/questions/1330339/prevent-users-from-resizing-the-window-form-size) – bluish Aug 25 '15 at 12:48

8 Answers8

84

Set Form.FormBorderStyle to something else than Sizable.

Christian Hayter
  • 30,581
  • 6
  • 72
  • 99
  • Set Form.FormBorderStyle = FormBorderStyle.FixedSingle should be the correct answer. There's one possible FormBorderStyle named SizableToolWindow which will result to a form still sizable but with no maximum/minimum button. – Edward Zhang Oct 05 '20 at 07:55
30

Use this:

this.FormBorderStyle = FormBorderStyle.FixedSingle; 
TurBas
  • 1,646
  • 13
  • 15
4

"Set Form.FormBorderStyle to something else than Sizable" is not enough, need to set MaximizeBox = False, or user can change form size by maximum it

yelliver
  • 5,648
  • 5
  • 34
  • 65
  • By setting `MaximizeBox` at `False` you deactivate the maximize button on the top right corner I suggest to do this AND to set `Form.FromBorderStyle` to `FixedDialog` – Jacques R Jul 06 '21 at 10:44
2

If you desire to set this in designer under Appearance there is a field to set FormBorderStyle this can be changed to something that starts out with Fixed*.

Kram
  • 153
  • 1
  • 4
2

[...] FormBorderStyle.FixedDialog border style changes the border of the form to that of a dialog box and prevents the form from being resized. [...]

http://msdn.microsoft.com/en-us/library/system.windows.forms.form.formborderstyle.aspx

sshow
  • 8,820
  • 4
  • 51
  • 82
Andrey
  • 5,906
  • 4
  • 24
  • 30
1

Just go under misc and change sizeable to false.

1

to make a form not resizable just change the property: FormBorderStyle to anything but not Resizable.

Davide Piras
  • 43,984
  • 10
  • 98
  • 147
0
formName.FormBorderStyle = FormBorderStyle.FixedSingle; 
Mariusz Jamro
  • 30,615
  • 24
  • 120
  • 162