Hi, thread question:
public void FinishReception()
{
if(!this.Visible)
this thread wait
MethodInvoker mi = new MethodInvoker(Method that will update UI);
this.BeginInvoke(mi);
}
}
so i open a new form with a control that imediately will be wait for a file transfer that is tranfering on another thread and show the document and set some fields according to the file data. when the file arrives the FinishReception() method runs.
When the file arrives after thecontrol is visible i've got no problem, but when the file arrives before the control is visible i can't use the invoke.
How do i stop the thread that is running FinishReception() and how and when do i awake it ?
Thanks