我正在使用SplitContainterMDI 父表单。
我的问题是我在panel1名为First Form中加载了一个表单。在第一个表单中,我SecondForm在 panel2 中加载了一个按钮。
我正在使用这段代码:
Form In_but = new SecondForm();
In_but.MdiParent = this.ParentForm;
In_but.TopLevel = false;
this.splitContainer1.Panel2.Controls.Add(In_but);
In_but.Show();
但它不起作用。错误是:does not contain definition splitContainer1。