CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2001
    Posts
    65

    Whats the code to maximize a form?

    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


  2. #2
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: Whats the code to maximize a form?

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured