T
Terry
Can the main thread be notified of an event raised by a spawned?
A button on a form creates a new thread which will raise an event when
it is finished. When the form is notified of the thread termination
event, I want my form to create a new form and make the new form's MDI
parent the same as it's MDI parent. Problem is that I get an error
stating that controls created in a thread cannot have their parent set
to a form in another thread. If I don't set the MDI parent of the new
form, it flashes up and then dies as the spawned thread dies.
How can I create the new form when the spawned thread dies, set its
mdi parent, and have it persist after the thread dies? (I don't want
to have code on the main form continuously polling the new thread)
thanks!
A button on a form creates a new thread which will raise an event when
it is finished. When the form is notified of the thread termination
event, I want my form to create a new form and make the new form's MDI
parent the same as it's MDI parent. Problem is that I get an error
stating that controls created in a thread cannot have their parent set
to a form in another thread. If I don't set the MDI parent of the new
form, it flashes up and then dies as the spawned thread dies.
How can I create the new form when the spawned thread dies, set its
mdi parent, and have it persist after the thread dies? (I don't want
to have code on the main form continuously polling the new thread)
thanks!