Re: How to resize form in Design Environment




"hon123456" <peterhon321@xxxxxxxxxxxx> wrote in message
news:1159522286.618113.21930@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dear all,

I got two forms in a project, the forms always being
showed in a small size. After I resize it to maximum size in design
environmet and save it, it just return to the small size. How can I
save the form's
size in the development environment.


Do you mean you're maximizing the form by clicking the Maximize button in
the form's titlebar? VB does not save the state if you do that. Set the
form's WindowState property in the Properties window. Note that even if set
WindowState to 2- Maximized , the form will not be maximized when in Design
mode; however, it will be maximized (initially) when you run your project.

In the IDE when in Design mode, forms are always sized and positioned to
whatever the Left, Top, Height and Width properties are set. If you want
your form to be sized to the entire screen while in Design mode, you'll need
to set these properties. Also note that if you have the IDE set to MDI mode
(the default), you'll never be able to size your forms to the entire screen
while in Design mode because there's a limited "designer area" in which
forms appear. You would need to change the IDE to use SDI mode (Advanced
tab of VB's Options dialog box).

In most cases, it's almost always better to size your forms at
runtime...IOW, write code to do it.

--
Mike
Microsoft MVP Visual Basic



.


Loading