Windows Develop Bookmark and Share   
 index > Windows Forms General > Tiling children in MDI Parent space
 

Tiling children in MDI Parent space

Hi!
  I want to position child windows in a specified location on load - and I want to tile windows on demand; I also need to retain the original size of one of the child windows, and tile the remaining to the right of that.
   In VS6, I would set the .Top and .Left properties of the form; in .Net, that doesn't seem to function the same.
   Any help would be gratly appreciated.

Rick Ireland
Detroit, MI
MigrationUser 1  Tuesday, May 13, 2003 5:30 PM
Hello, maybe I can help:
1) To "tile windows on demand" I would recommend hooking a menuitem's click event (for example) to call: myMdiParentForm.LayoutMdi() -- which will take several different MdiLayout enum values: ArrangeIcons, Cascade, TileHorizontal, TileVertical

2) So, you need to keep one window in a fixed location and be able to tile/manipulate the others?  Well, what you could do is divide your MdiParentForm with a panel & splitter before you set the IsMdiContainer to 'true'.  This way, you could achieve a windows explorer like application where you always have some fixed area docked to some side.  Although, I'm not exactly sure if this is what you need to do.

3) To retain the original size of your children Forms: a simple solution would be to keep a list of sizes on your MdiParent - you could watch/sync the Layout event of your children and update the list when appropriate.

4) I quickly played around with setting the Top, Left, etc... values of my MdiChildren and everything seemed to work great for me...
       this.MdiChildren[0].Top = 100;
...is this what you were doing?

Hope that helps,
-Fred


MigrationUser 1  Tuesday, May 13, 2003 6:30 PM
Hi Fred,

Can you explain how to do #2?  That's exactly what I'm interested in...

Thanks,

Dawn
MigrationUser 1  Monday, November 17, 2003 3:51 PM

You can use google to search for other answers

Custom Search

More Threads

• .NET Framework 2.0
• Container Within User Control
• form closing
• Printing Problem
• Radio Button at a Database
• ContextMenuStrip possible bug?
• Question which control to use for a VB.NET App
• ListBox Woes???
• How to open existing 2nd form (not a new form) from the 1st form in C#?
• gui threads with controls bound to the same data source