BackgroundWorker.IsBusy プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > BackgroundWorker.IsBusy プロパティの意味・解説 

BackgroundWorker.IsBusy プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

BackgroundWorker が非同期操作実行かどうかを示す値を取得します

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

Dim instance As BackgroundWorker
Dim value As Boolean

value = instance.IsBusy
public bool IsBusy { get;
 }
/** @property */
public boolean get_IsBusy ()

プロパティ
BackgroundWorker非同期操作実行中の場合trueそれ以外場合false

解説解説

RunWorkerAsync を呼び出すと、BackgroundWorker非同期操作開始します

使用例使用例

IsBusy プロパティ使用してBackgroundWorker 操作完了待機する方法次のコード例示します次のコード例は、「方法 : バックグラウンドファイルダウンロードする」で示されている例の一部です。

Private Sub dowloadButton_Click( _
ByVal sender As Object,
 _
ByVal e As EventArgs) _
Handles dowloadButton.Click

    ' Start the download operation in the background.
    Me.backgroundWorker1.RunWorkerAsync()

    ' Disable the button for the duration of the download.
    Me.dowloadButton.Enabled = False

    ' Wait for the BackgroundWorker to finish the download.
    While Me.backgroundWorker1.IsBusy
        ' Keep UI messages moving, so the form remains 
        ' responsive during the asynchronous operation.
        Application.DoEvents()
    End While

    ' The download is done, so enable the button.
    Me.dowloadButton.Enabled = True
End Sub
private void dowloadButton_Click(object sender,
 EventArgs e)
{
    // Start the download operation in the background.
    this.backgroundWorker1.RunWorkerAsync();

    // Disable the button for the duration of the download.
    this.dowloadButton.Enabled = false;

    // Wait for the BackgroundWorker to finish the download.
    while (this.backgroundWorker1.IsBusy)
    {
        // Keep UI messages moving, so the form remains 
        // responsive during the asynchronous operation.
        Application.DoEvents();
    }

    // The download is done, so enable the button.
    this.dowloadButton.Enabled = true;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

BackgroundWorker.IsBusy プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



BackgroundWorker.IsBusy プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS