Click here to Skip to main content
15,918,193 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi,
How can I disable the resizing of a form??
I thought the "Locked" property is the answer, I assigned it as "True",
but still I can resize the form on runtime!
Thx
Posted
Updated 6-Jul-20 17:19pm

Look at property of Windows Form: SizeGrip[^].
More infos: how to prevent form resizing[^]
 
Share this answer
 
Comments
saleem_deek 16-Aug-11 18:32pm    
Thx a lot :)
Maciej Los 16-Aug-11 18:35pm    
You're welcome
Set the appropriate border style, minimum and maximum size and remove min/max buttons in the title bar.
 
Share this answer
 
Comments
saleem_deek 16-Aug-11 18:32pm    
Thx to you too :D
I know it's a bit late, but I think the easiest way to do it would be setting the FormBorderStyle to "FixedSingle". That would prevent users from stretching your forms.
 
Share this answer
 
Comments
CHill60 7-Jul-20 4:13am    
Being late with a solution isn't the problem - not adding anything new to the thread is though. The use of FormBorderStyle = FixedSingle appears in the 2nd link from solution 1. Solution 2 explicitly mentions borderstyle and also points out that you need to change the min/max buttons too.
I see that OriginalGriff has already cautioned you on this - he gives sound advice :-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900