I am still having problems with figuring out how to create winforms in a separate UI thread that I discussed here.
In trying to figure this out I wrote the following
Instead of calling show() on the form which will execute on the form and then just close at the end of the thread execution within function StartUiThread(), you can lock the thread until the form is stopped within the method as you are simply locking the other thread. Ex:
public void StartUiThread() {
_form = new Form1();
_form.ShowDialog(); //Change Show() to ShowDialog() to wait in thread
}
This will cause the new thread to wait until the dialog is closed. I do not know if this will solve your problems, but it solved mine.