Window Size in Runtime

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tamasumalta@hotmail.com

    #1

    Window Size in Runtime

    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

  • Maligui

    #2
    Re: Window Size in Runtime

    This is done through the window state property.

    Me.WindowState = FormWindowState .Maximized


    --
    Thiele Enterprises - The Power Is In Your Hands Now!
    <tamasumalta@ho tmail.comwrote in message
    news:1161286073 .963396.136820@ m73g2000cwd.goo glegroups.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
    >

    Comment

    • tamasumalta@hotmail.com

      #3
      Re: Window Size in Runtime

      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:
      This is done through the window state property.
      >
      Me.WindowState = FormWindowState .Maximized
      >
      >
      --
      Thiele Enterprises - The Power Is In Your Hands Now!
      <tamasumalta@ho tmail.comwrote in message
      news:1161286073 .963396.136820@ m73g2000cwd.goo glegroups.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

      Comment

      • Ryan S. Thiele

        #4
        Re: Window Size in Runtime

        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(B yVal sender As System.Object, ByVal e As
        System.EventArg s) 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!

        --
        <tamasumalta@ho tmail.comwrote in message
        news:1161319217 .708890.231830@ b28g2000cwb.goo glegroups.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:
        This is done through the window state property.
        >
        Me.WindowState = FormWindowState .Maximized
        >
        >
        --
        Thiele Enterprises - The Power Is In Your Hands Now!
        <tamasumalta@ho tmail.comwrote in message
        news:1161286073 .963396.136820@ m73g2000cwd.goo glegroups.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

        Comment

        • Claes Bergefall

          #5
          Re: Window Size in Runtime

          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


          Comment

          Working...