C# .Net télécharger un fichier (avec avancement)

6 02 2010

Utilisation du web client : System.Net.WebClient

Souscrire à l’évènement DownloadProgressChanged , DownloadFileCompleted

Lancer le téléchargement en asynchrone ==> DownloadFileAsync(Uri,string)

Le DownloadProgressChangedEventArgs possède les propriétés : TotalBytesToReceive, ProgressPercentage, BytesReceived

Voilà

Source : http://www.dreamincode.net/forums/showtopic115491.htm