Hello,
"Dmitry Shaporenkov" <(E-Mail Removed)> schrieb:
> in my application I want to implement a progress
> indicator which has 'Cancel' button allowing to interrupt
> the current activity. What is the best way to do such a
> thing? I'm considering the following variant:
>
> The progress indicator is created on demand on the
> separate thread and stored in the local memory of the
> thread that has initiated its creation ('initiating
> thread'). The progress indicator also stores a reference
> to the initiating thread. When a user clicks 'Cancel'
> button, a delegate is executed on the initiating thread
> that throws an exception, so that it can be handled
> somewhere on the initiating thread.
Untested:
http://www.codeproject.com/cs/miscct...ressdialog.asp
--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet