Prevent users from resizing the window/form size
Change FormBorderStyle
to FixedDialog
, FixedSingle
, or Fixed3D
. Also, if you do not want them to maximize the form set Maximize
to False.
Change the BorderStyle to be one of the "Fixed" styles and remove the maximize button.
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.
Set the FormBorderStyle
to another value like FixedSingle
or FixedDialog
.