private void addMemberToolStripMenuItem_Click(object sender, EventArgs e) { pnlMain.Hide(); frmAddMember addMemberForm = new frmAddMember(); addMemberForm.MdiParent = this; addMemberForm.Show(); }
private void toolAddMember_Click(object sender, EventArgs e) { pnlMain.Hide(); Form activeChild = this.ActiveMdiChild; frmAddMember addMemberForm = new frmAddMember(); if (activeChild == null) { addMemberForm.Show(); addMemberForm.MdiParent = this; } else { addMemberForm.Show(); addMemberForm.MdiParent = this; activeChild.Close(); } }