Ejemplo n.º 1
0
        private void btnSubjects_Click(object sender, EventArgs e)
        {
            frmSubjects frm = new frmSubjects();

            frm.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
 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);
     }
 }