2009-09-13 79 views
2

我有一个MDI父窗体,它在运行时创建许多MDI子项。有没有一种巧妙的方法可以在父母那里均匀分配这些表单? 有什么想法?在MDI父项中MDI儿童的分布

在此先感谢!

回答

3
**ArrangeIcons**  child window icons are arranged within the parent 
**Cascade**   arrange the child windows within the parent window in a cascaded fashion 
**TileHorizontal** tile the child windows horizontally 
**TileVertical**  tile the child windows vertically 


//Cascade all child forms.   
this.LayoutMdi(System.Windows.Forms.MdiLayout.Cascade); 

看看http://www.codeproject.com/KB/cs/mdiformstutorial.aspx一开始

+0

我只好把this.LayoutMdi到保护覆盖无效OnShown把布局工作工作http://stackoverflow.com/a/2836353/74585 – 2014-04-21 02:24:54