Solved

Resize Child Forms to fit in Parent Form when Resized

Posted on 2009-04-09
3
2,485 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
  • 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now