C
Chris Capel
Hey everyone.
If you call ShowDialog on a form from the main thread of an application, it
behaves like a modal dialog. However, if you call ShowDialog from a
different thread, using the default overload, it behaves like you called
Show. If you assign the parent, the "modal" form stays on top of the parent
but does not prevent input to the parent.
This makes it hard for me to accomplish what I'm trying to do: show a modal
dialog that says "Loading..." when the user takes an action that could be a
while to finish. It needs to stay on top of the main form and prevent input
to the main form just like a modal dialog, but it can't block the execution
of the main thread because that's where the work is being done.
Anyone have any ideas?
Chris
If you call ShowDialog on a form from the main thread of an application, it
behaves like a modal dialog. However, if you call ShowDialog from a
different thread, using the default overload, it behaves like you called
Show. If you assign the parent, the "modal" form stays on top of the parent
but does not prevent input to the parent.
This makes it hard for me to accomplish what I'm trying to do: show a modal
dialog that says "Loading..." when the user takes an action that could be a
while to finish. It needs to stay on top of the main form and prevent input
to the main form just like a modal dialog, but it can't block the execution
of the main thread because that's where the work is being done.
Anyone have any ideas?
Chris