private void officeToolStripMenuItem_Click(object sender, EventArgs e) { Form fc = Application.OpenForms["FrmUserManagement"]; Form fcParentMenu = Application.OpenForms["FrmMainScreen"]; if (fc != null) { fc.Focus(); } else { FrmOffice f1 = new FrmOffice(); f1.MdiParent = fcParentMenu; f1.Show(); } }
void mnuOffice_Click(object sender, EventArgs e) { Form fc = Application.OpenForms["FrmOffice"]; Form fcParentMenu = Application.OpenForms["FrmMainScreen"]; if (fc != null) { fc.Focus(); } else { FrmOffice f1 = new FrmOffice(); f1.MdiParent = fcParentMenu; f1.Show(); } }