Bahar Jalali

Bahar Jalali

  • NA
  • 185
  • 304.9k

Execute my code while the program is running or the form is opened

Aug 3 2011 3:59 AM
hi
i want my code execute always , while my program is running or while my form is opened

i use if form is already open but it work only once and don't work continuously!
like this:

/////////////////////

public void Form1_Load(object sender, EventArgs e)
  {
  FormCollection fc = Application.OpenForms;

  foreach (Form frm in fc)
  {
  //iterate through
  // here is my code
 
  }
}

/////////////////////

is it true that check it in form load?
could you help me ?



Answers (3)