User can change form size. I do not find a property of form that do not allow user to change form size.
-
Does this answer your question? [How do I prevent a form from being resized by the user?](https://stackoverflow.com/questions/1119256/how-do-i-prevent-a-form-from-being-resized-by-the-user) – rold2007 Dec 08 '21 at 05:54
11 Answers
There are a few of workarounds for this:
Set maximum size property to a value you prefer. If you do not want the application window to be shrunk as well, then set a minimum size property. If you prefer the application to have the exact same size as that of design time, then set both maximum size and minimum size as size of your window. (Once you set maximum size or minimum size from the designer, you can't resize your window programmatically, unless you re-set maximum size and minimum size programmatically again)
Set FormBorderStyle to FixedSingle or FixedDialog. The difference in looks wont be noticeable for untrained eyes, but one considerable difference I'd found from my experience is that, when you make it FixedSingle, you can still change the size programmatically. With FixedDialog its not possible. That's a huge advantage for FixedSingle property. (If you want to change size of your window programmatically here after going for FixedDialog, then you got to programmatically change FormBorderStyle first, which would create a slight blink effect when running the application).
So simply go for FixedSingle. And to make sense, do the following:
a. Set maximize box property to false.
b. Set SizeGripStyle to Hide.

- 70,104
- 56
- 326
- 368
Change the BorderStyle to be one of the "Fixed" styles and remove the maximize button.

- 8,002
- 1
- 34
- 48
From the Form Properties Window set:
1. FormBorderStyle -> FixedSingle.
2. MaximizeBox -> False.

- 820
- 9
- 17
You can change the border style to :
BorderStyle - fixedToolWindow
But you will loose the maximize and minimize buttons, custom buttons will be needed if you require those functionalities.

- 1,931
- 12
- 39
- 77
The form has MinimumSize and MaximumSize properties that you can set to control this. You might use this if you want to keep the standard form border.

- 10,974
- 4
- 36
- 48
Just add this 2 lines of C# code for your form (inside InitializeComponent() function):
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.ImeMode = System.Windows.Forms.ImeMode.NoControl;
Tested with Visual Studio 2017 with .NET 4.6.1

- 97
- 5
For each form, there is a Maximize Box option. Please set it to false to avoid resize. See example here:

- 3,134
- 13
- 34
- 54

- 11
- 2