AlwaysBeCoding
AlwaysBeCoding

Reputation: 43

Disable user resize a form after specific size

I would like to let users resize my form but when they reach a specific size to disable this ability to make it smaller window than i want.

Any suggestions?

Upvotes: 1

Views: 1364

Answers (4)

Adam Robinson
Adam Robinson

Reputation: 185693

Set the MinimumSize property on your form. This will prevent the user from making the form any smaller than this value. Similarly, you can set the MaximumSize property to ensure that they cannot make it any larger than that value.

Upvotes: 3

Reed Copsey
Reed Copsey

Reputation: 564801

Set the form's MinimumSize property to the smallest size you want to allow.

Upvotes: 1

SLaks
SLaks

Reputation: 888067

Set the form's MinimumSize property in the designer.

Upvotes: 1

Oded
Oded

Reputation: 499302

You can set the MinimumSize property of the form to the minimum size you want to enforce.

There is also a mirror property MaximumSize (mentioned for completeness).

Upvotes: 5

Related Questions