private void btnSubjects_Click(object sender, EventArgs e) { frmSubjects frm = new frmSubjects(); frm.Show(); this.Hide(); }
private void toolStripMenuItem4_Click(object sender, EventArgs e) { try { frmSubjects frm = new frmSubjects(); frmSubjects open = Application.OpenForms["frmSubjects"] as frmSubjects; if (open == null) { frm.MdiParent = this; frm.Show(); } else { open.Activate(); if (open.WindowState == FormWindowState.Minimized) { open.WindowState = FormWindowState.Normal; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }