Solved

Resize Child Forms to fit in Parent Form when Resized

Posted on 2009-04-09
3
2,817 Views
Last Modified: 2012-05-06
I have an MDI app with several child forms.  
When the app first loads it is maximized and when a child form is opened I specify
Dim ft As New frmMembers

        ft.MdiParent = Me
        ft.WindowState = Me.WindowState
        ft.Show()

and the form fits perfectly in the MDI Parent.
But when I bring the parent to normal size, the child forms do not resize and float in the MDI Parent container.
I would like to have all mdi child forms resize to fit in the Parent when the parent is resized.
I thought that I could run through each open child form and set childform.WindowState = Me.WindowState.
Problem, I don't know how to run through each child form to change it's state...
For each childform in Me.childforms ???
If you think this is a good way to handle this, please provide an example, not a link.  My IE crashes when I click on links.
If you think there is a better way, please advice.
Thank you
0
Comment
Question by:Sheritlw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:Sheritlw
ID: 24112448
Found answer.  For anyone that is having the same problem...
Set your child forms Start Up Position to Manual.  

0
 
LVL 9

Accepted Solution

by:
djon2003 earned 500 total points
ID: 24112452
In the Resize event of your MdiParent form you could add this code :
For Each curForm As Form In Me.MdiChildren
    curForm.WindowState = Me.WindowState
Next

Open in new window

0
 

Author Closing Comment

by:Sheritlw
ID: 31568772
Exactly what I was looking for.
Thank you
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question