Not sure if this is the best way to do this, but here's what I did ...
1. Created a new thread. The thread invokes the intense method.
2. I start the thread. The method called by the thread periodically updates
some status labels on the form.
3. I also created a timer that runs every second.
4. The timer checks to see if the thread is still alive. If so, it keeps
the controls disabled and prevents the form from being closed. If it's not,
then I know it's completed and I can wrap things up.
That sound like the right way to do this?
Thanks!
> Hi all,
>
[quoted text clipped - 12 lines]
>
> Wade
SharpCoderMP - 19 Aug 2005 16:50 GMT
> Not sure if this is the best way to do this, but here's what I did ...
>
[quoted text clipped - 5 lines]
> the controls disabled and prevents the form from being closed. If it's not,
> then I know it's completed and I can wrap things up.
you dont need timer. your form can be enabled or disabled by a thread.
bur i wouldn't do that - it's because it would be nice to allow the user
co cancel this 10minute job. you should at least put a "cancel" button
somwhere that stops your thread and lets the user to take over control.
> That sound like the right way to do this?
>
[quoted text clipped - 16 lines]
>>
>>Wade