BackgroundWorker.ProgressChanged BackgroundWorker.ProgressChanged BackgroundWorker.ProgressChanged BackgroundWorker.ProgressChanged Event

정의

ReportProgress(Int32)가 호출될 때 발생합니다.Occurs when ReportProgress(Int32) is called.

public:
 event System::ComponentModel::ProgressChangedEventHandler ^ ProgressChanged;
public event System.ComponentModel.ProgressChangedEventHandler ProgressChanged;
member this.ProgressChanged : System.ComponentModel.ProgressChangedEventHandler 
Public Custom Event ProgressChanged As ProgressChangedEventHandler 

예제

다음 코드 예제에서는 ProgressChanged 이벤트를 사용자에 게 비동기 작업의 진행률을 보고 합니다.The following code example demonstrates the use of the ProgressChanged event to report the progress of an asynchronous operation to the user. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 BackgroundWorker 클래스입니다.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;
}
// This event handler updates the progress bar.
private void backgroundWorker1_ProgressChanged(object sender,
    ProgressChangedEventArgs e)
{
    this.progressBar1.Value = e.ProgressPercentage;
}
' This event handler updates the progress bar.
Private Sub backgroundWorker1_ProgressChanged( _
ByVal sender As Object, ByVal e As ProgressChangedEventArgs) _
Handles backgroundWorker1.ProgressChanged

    Me.progressBar1.Value = e.ProgressPercentage

End Sub

설명

이 이벤트는 호출 하는 경우는 ReportProgress 메서드.This event is raised when you call the ReportProgress method.

이벤트를 처리 하는 방법에 대 한 자세한 내용은 참조 하세요. 이벤트 처리 및 발생합니다.For more information about how to handle events, see Handling and Raising Events.

적용 대상

추가 정보