WebClient.DownloadDataCompleted イベントとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > WebClient.DownloadDataCompleted イベントの意味・解説 

WebClient.DownloadDataCompleted イベント

メモ : このイベントは、.NET Framework version 2.0新しく追加されたものです。

非同期データ ダウンロード操作完了時に発生します

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

Public Event DownloadDataCompleted As
 DownloadDataCompletedEventHandler
Dim instance As WebClient
Dim handler As DownloadDataCompletedEventHandler

AddHandler instance.DownloadDataCompleted, handler
public event DownloadDataCompletedEventHandler DownloadDataCompleted
public:
event DownloadDataCompletedEventHandler^ DownloadDataCompleted {
    void add (DownloadDataCompletedEventHandler^ value);
    void remove (DownloadDataCompletedEventHandler^ value);
}
/** @event */
public void add_DownloadDataCompleted (DownloadDataCompletedEventHandler
 value)

/** @event */
public void remove_DownloadDataCompleted (DownloadDataCompletedEventHandler
 value)
JScript では、イベント使用できますが、新規に宣言することはできません。
解説解説
使用例使用例

このイベントイベント ハンドラ設定するコード例次に示します

'  Sample call : DownLoadDataInBackground ("http:' www.contoso.com/GameScores.html")
Public Shared Sub DownloadDataInBackground(ByVal
 address As String)

    Dim waiter As System.Threading.AutoResetEvent
 = New System.Threading.AutoResetEvent(False)
    Dim client As WebClient = New
 WebClient()

    '  Specify that the DownloadDataCallback method gets called
    '  when the download completes.
    AddHandler client.DownloadDataCompleted, AddressOf
 DownloadDataCallback
                Dim uri as Uri = New
 Uri(address)
    client.DownloadDataAsync(uri, waiter)

    '  Block the main application thread. Real applications
    '  can perform other tasks while waiting for the download to complete.
    waiter.WaitOne()
End Sub

// Sample call : DownLoadDataInBackground ("http://www.contoso.com/GameScores.html");
public static void DownloadDataInBackground
 (string address)
{
    System.Threading.AutoResetEvent waiter = new System.Threading.AutoResetEvent
 (false);
    WebClient client = new WebClient ();
    Uri uri = new Uri(address);

    // Specify that the DownloadDataCallback method gets called
    // when the download completes.
    client.DownloadDataCompleted += new DownloadDataCompletedEventHandler
 (DownloadDataCallback);
    client.DownloadDataAsync (uri, waiter);

    // Block the main application thread. Real applications
    // can perform other tasks while waiting for the download to complete.
    waiter.WaitOne ();
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からWebClient.DownloadDataCompleted イベントを検索した結果を表示しています。
Weblioに収録されているすべての辞書からWebClient.DownloadDataCompleted イベントを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からWebClient.DownloadDataCompleted イベント を検索

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

辞書ショートカット

すべての辞書の索引

WebClient.DownloadDataCompleted イベントのお隣キーワード
検索ランキング

   

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



WebClient.DownloadDataCompleted イベントのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS