2009-09-13 80 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