コード例 #1
0
 private void tìmKiếmSâuHạiChínhToolStripMenuItem_Click(object sender, EventArgs e)
 {
     foreach (Form form in Application.OpenForms)
     {
         if (form.GetType() == typeof(frmSHC))
         {
             form.Close();
             break;
         }
     }
     if ((Application.OpenForms["frmSHC"] as frmSHC) == null)
     {
         frmSHC frmSHCmn = new frmSHC();
         frmSHCmn.Show();
     }
 }
コード例 #2
0
 private void pictureBox2_Click(object sender, EventArgs e)
 {
     foreach (Form form in Application.OpenForms)
     {
         if (form.GetType() == typeof(frmSHC))
         {
             form.Close();
             break;
         }
     }
     if ((Application.OpenForms["frmSHC"] as frmSHC) == null)
     {
         frmSHC frmSHCmn = new frmSHC();
         frmSHCmn.FormClosed += FrmSHCmn_FormClosed;
         frmSHCmn.Show();
     }
 }