在父表单中,我正在显示多个子表单,我正在打开child2 from child1
,child3 from child2
,直到它正常工作并且表单以父表单形式打开,但是当我想要从child2 to child1
比child1 form
在父表单外打开,什么可以是正确的后退代码?
用chil2 form
child1 form
的代码
private void btnEngClgList_Click(object sender, EventArgs e) {
ShowEngClgList engfrm = new ShowEngClgList(LoginName);
engfrm.MdiParent = this.ParentForm;
this.Hide();
engfrm.Show();
}
用child2 Form
private void toolStripBtnBack_Click(object sender, EventArgs e) {
this.Close();
MainForm mnfrm = new MainForm(lname);
mnfrm.MdiParent = this.ParentForm;
mnfrm.Show();
}
答案 0 :(得分:0)
((this.Parent) as Window).show();