//新建 private void tsm_NewItem_Click(object sender, EventArgs e) { //实例化一个子窗体对象 FrmChild child = new FrmChild(); //设置窗体的父窗体 child.MdiParent = this; child.Show(); }
//关闭 private void tsm_Close_Click(object sender, EventArgs e) { FrmChild frm = (this.ActiveMdiChild) as FrmChild; frm.Close(); }