I want that the user shouldn't be able to resize the window form. I was able to disable the maximize button but wasn't able to find any property to disable resizing.
Any help?
I want that the user shouldn't be able to resize the window form. I was able to disable the maximize button but wasn't able to find any property to disable resizing.
Any help?
Change the FormBorderStyle to FixedSingle. Also set MinimizeBox and MaximizeBox to False. Even double clicking the title will not maximize the form.
Assuming you are talking about a WinForms form, you can disable resizing by changing the FormBorderStyle
property to one of the Fixed values, such as FixedSingle
. There are also MaximumSize
and MinimumSize
properties that may be set if you want to allow some, but not total, resizing.
If you are talking about a WPF application, then you can set the ResizeMode
property to NoResize
, or you can set the MaxHeight
, MaxWidth
, MinHeight
, and MinWidth
properties.
As noted in the comments for the question, make sure you have a good reason to disable resizing. Most of the time, there are better alternatives that allow resizing (especially in WPF).
You need to set the FormBorderStyle property to one of the fixed values.