Threading

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I have a thread to fil a progress bar during a process, and I need to get a
notification to do an Action.... How can I detect that the thread has
finished already?
 
Hi,

I suggest that the thread when finish rise an event to the main thread.
using Control.Invoke, like :

void theThreadedMethod()
{
//do stuff...

//when done
progressBar1.Invoke( new MethodInvoker(DoneWorking) );
}


//this method will run in the UI thread
void DoneWorking()
{
//do what I need.
}


cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation


"Diogo Alves - Software Developer"
 
Back
Top