Want to Size a MDI Child to fill MDI Parent Container in VB.NET


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Want to Size a MDI Child to fill MDI Parent Container in VB.NET

  1. #1
    Phil Weber Guest

    Re: Want to Size a MDI Child to fill MDI Parent Container in VB.NET

    James: Set the child form's WindowState property to "Maximized."
    ---
    Phil Weber



  2. #2
    James Burns Guest

    Want to Size a MDI Child to fill MDI Parent Container in VB.NET


    Help!!!

    I have a MDI Parent with a Outlook Style Bar on the Left of my Form and a
    Status Bar (bottom) and Menu Bar (top). When you click an Item from my Outlook
    Bar the corresponding form pops up... however I want it to fill all of the
    empty space of the MDI Parent... help...

    Thanks

  3. #3
    Larry Rebich Guest

    Re: Want to Size a MDI Child to fill MDI Parent Container in VB.NET

    Phil:

    This technique [maximized] works for a single child form. And will probably
    suffice for Jim's requirement.

    I have spent the better part of a week trying to get the coordinates for
    VB.Net's MDI Client Area. The ClientSize property does not return the
    correct Width or Height - if the form contains docked controls. So its not
    possible to position child forms correctly. With VB6 we could use ScaleWidth
    and ScaleHeight to get the size of the client area.

    So, for example, we want to show two VB.Net child forms - side by side. It
    can't be done using ClientSize because ClientSize does not consider the
    space used by the docked controls.

    Do you know of any VB.Net MDI property that will return the correct client
    size?

    If you want to test the problem, do:

    1. Create an MDI form,
    2. Put a docked control on the form,
    3. Create a child form,
    4. Try to center the child form in the MDI client area without having to
    figure out the location and size of the docked controls.

    If you are successful could you let me know how you did it! ;-)

    Cheers,
    Larry Rebich

    "Phil Weber" <pweber@nospam.fawcette.com> wrote in message
    news:3cf6801f$2@10.1.10.29...
    > James: Set the child form's WindowState property to "Maximized."
    > ---
    > Phil Weber
    >
    >




  4. #4
    Radhika Nair Guest

    Re: Want to Size a MDI Child to fill MDI Parent Container in VB.NET

    For each child form, I have set the "Dock" property to "Fill". This
    automatically, uses up all the space in the MDIParent that is remaining.

    Hope this helps.
    Radhika

    "Larry Rebich" <lrebich@earthlink.net> wrote in message
    news:3cf775aa@10.1.10.29...
    > Phil:
    >
    > This technique [maximized] works for a single child form. And will

    probably
    > suffice for Jim's requirement.
    >
    > I have spent the better part of a week trying to get the coordinates for
    > VB.Net's MDI Client Area. The ClientSize property does not return the
    > correct Width or Height - if the form contains docked controls. So its not
    > possible to position child forms correctly. With VB6 we could use

    ScaleWidth
    > and ScaleHeight to get the size of the client area.
    >
    > So, for example, we want to show two VB.Net child forms - side by side. It
    > can't be done using ClientSize because ClientSize does not consider the
    > space used by the docked controls.
    >
    > Do you know of any VB.Net MDI property that will return the correct client
    > size?
    >
    > If you want to test the problem, do:
    >
    > 1. Create an MDI form,
    > 2. Put a docked control on the form,
    > 3. Create a child form,
    > 4. Try to center the child form in the MDI client area without having to
    > figure out the location and size of the docked controls.
    >
    > If you are successful could you let me know how you did it! ;-)
    >
    > Cheers,
    > Larry Rebich
    >
    > "Phil Weber" <pweber@nospam.fawcette.com> wrote in message
    > news:3cf6801f$2@10.1.10.29...
    > > James: Set the child form's WindowState property to "Maximized."
    > > ---
    > > Phil Weber
    > >
    > >

    >
    >




  5. #5
    Join Date
    Jun 2009
    Posts
    1
    Radhika:

    You are a freaking genius and win 1,000,000 internets.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center