Disable resizing of a Windows Forms form

Ben Wilson picture Ben Wilson · Nov 1, 2011 · Viewed 243k times · Source

How do I turn off the user's ability to resize a Windows Forms form?

I'm having it resize itself on a click.

Answer

James Hill picture James Hill · Nov 1, 2011

Take a look at the FormBorderStyle property

form1.FormBorderStyle = FormBorderStyle.FixedSingle;

You may also want to remove the minimize and maximize buttons:

form1.MaximizeBox = false;
form1.MinimizeBox = false;