Skip to main content
gamedev.net
🔒 Locked

Non-Resizable

Started by Grantyt3 4 replies 500+ views
Original Post
Grantyt3
Grantyt3
How do I make my Form non-resizable? or do I just have to resize it to the size I want every frame? PS.Dang it I did it again. I put this in the DirectX forum. Sorry, move it if you need to.
nullsmind
nullsmind
What API are you working with?
Grantyt3
Grantyt3
DirectX, but it only has to do with Windows Forms.
nullsmind
nullsmind
The code is the following (assuming you're using C# for forms):
this.FormBorderstyle = FormBorderstyle.FixedSingle;

It could be placed in the form's constructor. Hope that helps.
Grantyt3
Grantyt3
Yep, that works. What about non-maximizable? Like, make the maximize button on the window disappear?
Flimflam
Flimflam
Quote:
Original post by Grantyt3
Yep, that works. What about non-maximizable? Like, make the maximize button on the window disappear?


this.MaximizeBox = false;

You can also set all these things in the form designer.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.