Home All Groups Group Topic Archive Search About

Window Size in Runtime

Author
19 Oct 2006 7:27 PM
tamasumalta
I am just new to vb.net. I used to program in vb 6. Can you kindly
indicate how I can maximise a form window to full in runtime. I think
this is a standard thing to design controls.

If this is not available then I have to drag the corners to try and
match the size for designing and setting up the controls. Altough
ticking the option "Maximised" for the field WindowState, this doesn't
have an effect in runtime and therefore controls can't be set up
correctly.

Can you kindly indicate what is the issue?

Thanks
Jansen

Author
19 Oct 2006 9:05 PM
Maligui
This is done through the window state property.

Me.WindowState = FormWindowState.Maximized


--
Thiele Enterprises - The Power Is In Your Hands Now!
<tamasuma***@hotmail.com> wrote in message
Show quoteHide quote
news:1161286073.963396.136820@m73g2000cwd.googlegroups.com...
>I am just new to vb.net. I used to program in vb 6. Can you kindly
> indicate how I can maximise a form window to full in runtime. I think
> this is a standard thing to design controls.
>
> If this is not available then I have to drag the corners to try and
> match the size for designing and setting up the controls. Altough
> ticking the option "Maximised" for the field WindowState, this doesn't
> have an effect in runtime and therefore controls can't be set up
> correctly.
>
> Can you kindly indicate what is the issue?
>
> Thanks
> Jansen
>
Author
20 Oct 2006 4:40 AM
tamasumalta
Malige thanks,

However this doesn't change the formwindow size to maximized in
runtime. It only maximise the window when the code is compiled.

Thanks
Jansen
Maligui wrote:
Show quoteHide quote
> This is done through the window state property.
>
> Me.WindowState = FormWindowState.Maximized
>
>
> --
> Thiele Enterprises - The Power Is In Your Hands Now!
> <tamasuma***@hotmail.com> wrote in message
> news:1161286073.963396.136820@m73g2000cwd.googlegroups.com...
> >I am just new to vb.net. I used to program in vb 6. Can you kindly
> > indicate how I can maximise a form window to full in runtime. I think
> > this is a standard thing to design controls.
> >
> > If this is not available then I have to drag the corners to try and
> > match the size for designing and setting up the controls. Altough
> > ticking the option "Maximised" for the field WindowState, this doesn't
> > have an effect in runtime and therefore controls can't be set up
> > correctly.
> >
> > Can you kindly indicate what is the issue?
> >
> > Thanks
> > Jansen
> >
Author
20 Oct 2006 5:25 AM
Ryan S. Thiele
Did you use this in a procedure?

e.g. I places a button on the form. I then double clicked the button to
create the handler clause.

then I placed this code.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
        Me.WindowState = FormWindowState.Maximized
End Sub

You can also place it in the Form_Load procedure, and many other places.
Does this help?


--
Thiele Enterprises - The Power Is In Your Hands Now!

--
<tamasuma***@hotmail.com> wrote in message
news:1161319217.708890.231830@b28g2000cwb.googlegroups.com...
Malige thanks,

However this doesn't change the formwindow size to maximized in
runtime. It only maximise the window when the code is compiled.

Thanks
Jansen
Maligui wrote:
Show quoteHide quote
> This is done through the window state property.
>
> Me.WindowState = FormWindowState.Maximized
>
>
> --
> Thiele Enterprises - The Power Is In Your Hands Now!
> <tamasuma***@hotmail.com> wrote in message
> news:1161286073.963396.136820@m73g2000cwd.googlegroups.com...
> >I am just new to vb.net. I used to program in vb 6. Can you kindly
> > indicate how I can maximise a form window to full in runtime. I think
> > this is a standard thing to design controls.
> >
> > If this is not available then I have to drag the corners to try and
> > match the size for designing and setting up the controls. Altough
> > ticking the option "Maximised" for the field WindowState, this doesn't
> > have an effect in runtime and therefore controls can't be set up
> > correctly.
> >
> > Can you kindly indicate what is the issue?
> >
> > Thanks
> > Jansen
> >
Author
20 Oct 2006 2:53 PM
Claes Bergefall
> However this doesn't change the formwindow size to maximized in
> runtime. It only maximise the window when the code is compiled.

This is a bit confusing. What do you mean that it maximizes the window when
the code is compiled? No code is running when you compile, only when you run
it. And runtime is when the app is running, i.e. when you press F5.
WindowState property should work just fine in that case. If it doesn't then
please provide a sample reproducing the error.

Design time is when the app is not running, i.e. when you're designing it.
WindowState doesn't have any effect in design time

From the sound of it I'm guessing that you mean it works when you run the
application, but you want to maximize it during design time so you can
layout your controls on the design surface? Unfortunately I don't think
there is a way to do that. You will have to drag the corners to the size you
want.

   /claes