20-09-12, 03:03 AM
PHP كود :
Private Sub btnDownload_Click(sender As Object, e As EventArgs)
Dim webClient As New WebClient()
webClient.DownloadFileCompleted += New AsyncCompletedEventHandler(AddressOf Completed)
webClient.DownloadProgressChanged += New DownloadProgressChangedEventHandler(AddressOf ProgressChanged)
webClient.DownloadFileAsync(New Uri("http://mysite.com/myfile.txt"), "c:\myfile.txt")
End Sub
Private Sub ProgressChanged(sender As Object, e As DownloadProgressChangedEventArgs)
progressBar.Value = e.ProgressPercentage
End Sub
Private Sub Completed(sender As Object, e As AsyncCompletedEventArgs)
MessageBox.Show("Download completed!")
End Sub
سامر عبد الله عبد الغني
