C# – Disable resizing of a Windows Forms form

cwinforms

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

I'm having it resize itself on a click.

Best Answer

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;