I am creating a new thread, which contains only this code:
void myThread()
{
new Form1().Show();
}
Keeping it generic for questions sake.
How could i stop this thread from ending? Because the thread ends, the form closes. How could i continue the thread going, so that the form can stay open, and still trigger events (such as button clicks, etc.)
Thanks for any help 🙂
Well, if you’re using multithreading to display an additional form, you should call
Application.Run(Form)instead.Edit: Just to be clear, the
Application.Runmethod won’t end before the form is closed. All event and such will work.