In my project, I have:
Form1, <– this is the main form, run in main thread
Form2, <– this is the subform
1 background worker
experienced problem:
when I create a new form inside background worker, and show it using
Form2 test = new Form2(); *test.show();*
the form shows up, but freezed and I can do nothing to the form
the question is:
1. is it able to create a form inside a background worker but, the form will run on the main thread?
2. if yes, how to do it? 🙂
3. if not, how to control a form that, I declared on the main thread, from backgroundworker
You should use Control.Invoke to create new Form’s .
and class this method by