2009-08-29 254 views
1

我知道使用表示其他形式的形式follwing两种方法MDI父子窗体位置问题

方法1

public Form1() 
{ 
    InitializeComponent(); 

    Form2 embeddedForm = new Form2(); 
    embeddedForm.TopLevel = false; 
    Controls.Add(embeddedForm); 
    embeddedForm.Show(); 
} 

方法2

Form1 fChild = new Form1(); 
fChild.MdiParent = this; 
fChild.Show(); 

我需要学习如何在父窗体小组中显示此子窗体

或者如果有人能告诉我如何设置x,子窗体的y坐标

回答

1

您可以随时更改形式的父母,例如:

fChild.TopLevel = false; 
fChild.Parent = fParent.panel1;