BackgroundWorker::ProgressChanged Event

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Occurs when ReportProgress is called.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

public:
event ProgressChangedEventHandler^ ProgressChanged {
	void add(ProgressChangedEventHandler^ value);
	void remove(ProgressChangedEventHandler^ value);
}

This event is raised when you call the ReportProgress method.

For more information about handling events, see NIB: Consuming Events.

The following code example demonstrates the use of the ProgressChanged event to report the progress of an asynchronous operation to the user. This code example is part of a larger example provided for the BackgroundWorker class.

// This event handler updates the progress bar.
void backgroundWorker1_ProgressChanged( Object^ /*sender*/, ProgressChangedEventArgs^ e )
{
   this->progressBar1->Value = e->ProgressPercentage;
}

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show: