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);
}
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.