Click to See Complete Forum and Search --> : Whats the code to maximize a form?


Mark1
July 12th, 2001, 11:13 AM
Hi,

I have a form, and it is cluttered with various buttons, images, etc.

When I click `Run` it doesn`t open up full size.

Can anyone tell me the code for making the form open up to its maximum size upon running the code.

Thanks

Mark

Ghost308
July 12th, 2001, 11:20 AM
If you want it to run full-screened, set the Window State property of the form to 2 - Maximized. If you don't necessarily want it maximized but still be big enough to hold all your controls at once, try playing with the BorderStyle property. Making it Fixed Single will display the window as the size you designed it in. That mode also disables the Min and Max buttons by default so you'll have to re-enable them with the MinButton and MaxButton properties. Hope that helps!

Jeff