R
Reg Rat
Hi,
I'm trying to do something that appears extremely simple but I can't find an
obvious solution for it. I want to create a modal dialog which, upon being
displayed, immediately starts doing some work which may take some time (the
dialog is simply to display progress via a progress bar and an updating
label with a cancel button). The obvious solution is to put the call to the
method doing the work in the Load event handler of the dialog, but this
causes the work to start before the dialog has been displayed.
It looks like the only option I have is to kick off a new thread in the Load
handler which will do the work, but this seems a bit over the top for my
purposes, particularly as this thread would need to call into the UI thread
to update the dialog.
Is there an obvious answer I have missed?
Thanks in advance,
Mike
I'm trying to do something that appears extremely simple but I can't find an
obvious solution for it. I want to create a modal dialog which, upon being
displayed, immediately starts doing some work which may take some time (the
dialog is simply to display progress via a progress bar and an updating
label with a cancel button). The obvious solution is to put the call to the
method doing the work in the Load event handler of the dialog, but this
causes the work to start before the dialog has been displayed.
It looks like the only option I have is to kick off a new thread in the Load
handler which will do the work, but this seems a bit over the top for my
purposes, particularly as this thread would need to call into the UI thread
to update the dialog.
Is there an obvious answer I have missed?
Thanks in advance,
Mike