BusyScreen bs; //The busy screen form displayed in a seperate thread
Thread t=new Thread(runThread)
t.start();
/*Do something else in main thread. When you want to stop the above
*thread (assuming the BusyScreen class has a method called
*KillMe(object o ,EventArgs e) which calls this.Dispose(); and this.Close();
*in order to stop the form and kill the thread
*/
bs.invoke(new EventHandler(bs.KillMe));
public static void runThread()
{
bs=new BusyScreen();
Application.Run(bs);
}
[quoted text, click to view] "Ghost" wrote:
> How?
> Can you show me some examples please?
>
> "Ali" <aagardezi@gmail.com> wrote in message
> news:2E875922-47B7-4D14-B1E3-354D1C4855BC@microsoft.com...
> > You can use the control.invoke method to access an event handler in the
> > thread and use it to kill the thread that has that control.
> >
> > Ali Gardezi
> >
> > "Ghost" wrote:
> >
> > > Hello.
> > > How can I check if tread in Compact Framework is alive or how can I
> > > interrupt it?
> > >
> > >
> > >
>
>