Yaptım. Yetkili birisi konuyu silerse güzel olur kusuruma bakmayın
Son Düzenleme: 30/10/2016, 01:09, Düzenleyen: Mettleshade.
Dim client As WebClient = New WebClient
AddHandler client.DownloadProgressChanged, AddressOf client_ProgressChanged
AddHandler client.DownloadFileCompleted, AddressOf client_DownloadCompleted
client.DownloadFileAsync(New Uri("http://www.adres.com/IndirilecekDosya.rar"), Application.StartupPath + "\\DosyaninYeniAdi.rar")
btnIndir.Text = "İndirme devam ediyor..."
btnIndir.Enabled = False
Private Sub client_ProgressChanged(ByVal sender As Object, ByVal e As DownloadProgressChangedEventArgs)
Dim bytesIn As Double = Double.Parse(e.BytesReceived.ToString())
Dim totalBytes As Double = Double.Parse(e.TotalBytesToReceive.ToString())
Dim percentage As Double = bytesIn / totalBytes * 100
prgIndirmeSureci.Value = Int32.Parse(Math.Truncate(percentage).ToString())
End Sub
Private Sub client_DownloadCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs)
MessageBox.Show("İndirme işlemi tamamlandı")
btnIndir.Text = "İndir"
btnIndir.Enabled = True
End Sub