Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with starting threads

Status
Not open for further replies.

kokon

Programmer
Apr 27, 2006
31
PL
Hello, I`ve got to subs like this (second one doesnt want to start thread):
-------------------------------------
public void button4_Click(object sender, EventArgs e)
{
this.demoThread = new Thread(new ThreadStart this.ThreadProcSafe));
this.demoThread.Start();
}
public void process2_Exited(object sender, System.EventArgs e)
{
MessageBox.Show("Exited2");
this.demoThread = new Thread(new ThreadStart(this.ThreadProcSafe));
this.demoThread.Start();
}
---------------------------------------
First one started by button works ok.
But the second one which is started by:
--------
myProcess.Exited += new System.EventHandler(kol.process2_Exited);
--------
doesnt work. I can see the MessageBox, but after that- silent.
Please help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top