Cina Ebra
Cina Ebra

Reputation: 526

how to disable form resizing using c#

How to disable form resizing using c# ?

I just want to avoid resizing my form by user.

I tried changing FormBorderStyle But it doesn't work Thanks!

Upvotes: 0

Views: 1400

Answers (1)

alireza amini
alireza amini

Reputation: 1742

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;

Upvotes: 2

Related Questions