1)主窗体属性IsMdiContainer设置成true;
2)假设子窗体名称为NewForm,当在菜单中点击New菜单项时,需要显示子窗体
NewForm newform = new NewForm();
newform.MdiParent = this;
newform.show();
本文介绍如何在主窗体中设置IsMdiContainer属性为true,并通过实例演示了如何在点击New菜单项时创建并显示子窗体NewForm。
1)主窗体属性IsMdiContainer设置成true;
2)假设子窗体名称为NewForm,当在菜单中点击New菜单项时,需要显示子窗体
NewForm newform = new NewForm();
newform.MdiParent = this;
newform.show();

被折叠的 条评论
为什么被折叠?