as

Sunday 19 January 2014

How to not allow user to resize the window in C#.Net

By default, all form windows that you create in c# (c sharp) windows applications are resizeable.  That means User can drag the edges to change the width and height  of the window.

If you wan to fix the width and height of the window permanently, you can use below properties.

this.MinimumSize = new Size(200, 400);

this.MaximumSize = new Size(200, 400);

After you run above code, the size of the window can not be changed.

You can also change these properties at design time. Just click on the form and change the minimumsize and maximumsize properties in properties window.



What do you think on this topic? Please express your opinion through comment below

Sponsored Links

Popular Posts

Comments

ShareThis