Difference between "ProgressChanged" and "ReportProgress"

  • Thread starter Thread starter Curious
  • Start date Start date
C

Curious

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 :)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top