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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a form non resizeable.............

Status
Not open for further replies.

tomcoombs

Programmer
Aug 14, 2003
65
GB
I have a normal form, how do I get rid of the minimise, max and close squares at the top?


Thanks

Tom
 
Take a look at the properties of your form - there are boolean properties for MinimizeBox & MaximizeBox to turn them on and off. I don't know how to remove the Close box - you can probably just override the Closing event and set the Cancel property in the CancelEventArgs parameter to true to cause the close box to be ignored.

To prevent resizing, look at the FormBorderStyle property. It's an enumeration that allows you to set your form to one of:
Code:
Fixed3D
FixedDialog
FixedSingle
FixedToolWindow
None
Sizable
SizableToolWindow
Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
if you set the ControlBox property to false, you will get rid of all three buttons.

____________________________________________________
If you like a post, show you care by giving it a star.
 
Thanks, seanbo. I don't do a lot of GUI work, so I didn't know that.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
no worries chip, i do do a lot of gui work. try and call me sean.

____________________________________________________
If you like a post, show you care by giving it a star.
 
Thanks to you both - works like a treat ;-)

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top