I have a main window that, among other things, opens a thread.
In that thread, it opens another window and then it ends (end of the DoWork method).
To open the window I use:
MyCustomForm mcf = new MyCustomForm();
mcf.Show();
Basically it flashes open and then closed. so I tried something else instead:
mcf.Show(parent);
Where parent is the topmost form (my form of the application).
This doesn't work either. If I use Thread.Sleep() before the thread ends, I can see it opens and then closes/dies with the thread.
How can I get the window to stay open even tho the thread that creates it dies?? Is there any method on the parent form I could call to add it as its child so it doesn't go out of scope (which I'm assuming it does--never done forms programming before)
thanks a billion.
In that thread, it opens another window and then it ends (end of the DoWork method).
To open the window I use:
MyCustomForm mcf = new MyCustomForm();
mcf.Show();
Basically it flashes open and then closed. so I tried something else instead:
mcf.Show(parent);
Where parent is the topmost form (my form of the application).
This doesn't work either. If I use Thread.Sleep() before the thread ends, I can see it opens and then closes/dies with the thread.
How can I get the window to stay open even tho the thread that creates it dies?? Is there any method on the parent form I could call to add it as its child so it doesn't go out of scope (which I'm assuming it does--never done forms programming before)
thanks a billion.