Esempio n. 1
0
 private void tìmKiếmSinhVậtToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Form form in Application.OpenForms)
     {
         if (form.GetType() == typeof(frmTKSVH))
         {
             form.Close();
             break;
         }
     }
     if ((Application.OpenForms["frmTKSVH"] as frmTKSVH) == null)
     {
         frmTKSVH frmTKSVHmn = new frmTKSVH();
         frmTKSVHmn.Show();
     }
 }
Esempio n. 2
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == typeof(frmTKSVH))
                {
                    form.Close();
                    break;
                }
            }

            if ((Application.OpenForms["frmTKSVH"] as frmTKSVH) == null)
            {
                frmTKSVH frmTKSVHmn = new frmTKSVH();
                frmTKSVHmn.FormClosed += FrmTKSVHmn_FormClosed;
                frmTKSVHmn.Show();
            }
        }