Faizan Khan

Faizan Khan

  • NA
  • 11
  • 7.7k

I want to restrict a form to not ope if it is already open.

Jan 26 2013 2:07 AM
Behind the manue strip i put this code form opeing a Form

private void searchByWordToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            Form2_Search_Word SearchWord = new Form2_Search_Word();
            SearchWord.Show();
            SearchWord.MdiParent = this;
        }

But the problem is is when i click the menu strip is display a form as i click it again it shows another, another another. I want to restrict it if it already open and want to focus it. pleaes guide me i am the beginner

Answers (2)