Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable Form Resize 2

Status
Not open for further replies.

jalbao

Programmer
Nov 27, 2000
413
US
I'm trying to disable a form from being resizable. The best I can come up with, is to define the minsize and maxsize of the form. All though this method works fine, it strikes me as odd that .net wouldn't have a built in property for a form that enables/disables a form from being resized.

I'd like to hear some feedback on what "trix" some of you advanced dev'ers do to keep a form from being resized.

thx
 
Try:

Me.FormBorderStyle = FormBorderStyle.FixedDialog
 
Try setting the FormBorderStyle property of the form to FixedToolWindow.
 
Forgot to mention- with the above methods, you could also just click the maximize button or even if there isn't one, you could right-click the title bar- if you set
MaximizeBox = false
both of these options will be disabled. That should cover all the bases :)
 
Nice! Thanks for all the replies. I never thought to look in the border style props..

It turns out that Me.FormBorderStyle = FormBorderStyle.FixedDialog is exactly what I was looking for.

Thanks
 
dont forget to set SizeGripStyle to hide
also disable maximize box as mentioned earlier
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top