Date parsed: 04/01/2008 23:17:15
Date: Fri, 04 Jan 2008 22:17:15 +0100
>I use a background worker to process the data. Then updatge the UI
>controls to display the latest info.
>
>Someone told me to use a delegate "ProgressChanged" to launch an
>update of the UI controls (from the background worker thread). But
>someone else told me to use "ReportProgress" to launch an update of UI
>controls (from the background worker thread).
>
>What's the difference (or relation) between the two? Which one is
>better? I get lost in the world of a thread pool :)
ReportProgress is the method that should be called by the worker
thread to report its progress.
ProgressChanged is an event that can be handled by code (likely on the
UI thread) that needs to be notified of progress changes.
When ReportProgress is called it will cause ProgressChanged to be
raised.
Mattias
--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ |
http://www.dotnetinterop.comPlease reply only to the newsgroup.