Hello,
I would like to know how can I fire events of background worker when I
want to let know the main thread that the action finished and to send
results.
Is there a way to fire RunWorkerCompletedEventArgs in events from
background to main thread?
Thank you
Ignacio Machin ( .NET/ C# MVP ) - 16 Apr 2008 15:41 GMT
> Hello,
>
[quoted text clipped - 6 lines]
>
> *** Sent via Developersdexhttp://www.developersdex.com***
If you are using a win app is easy, just keep a Control reference in
the worker thread and raise an event by calling Control.Invoke
ruben - 16 Apr 2008 16:08 GMT
The simples way to use use BackgroundWorker Class, you code DoWork event to
implement the time-consuming process and store the result in e.Result object,
and then code RunWorkerCompleted to get the operation result in e.Result.
See BackgroundWorker Class help
http://msdn2.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx
Hope this help!
> Hello,
>
[quoted text clipped - 6 lines]
>
> *** Sent via Developersdex http://www.developersdex.com ***