I WANT TO MAKE A DOWNLOAD MANAGER FOR MY WEB BROWSER AND I ALL READY MADE TO POST ABOUT IT. mY PROBLEM IS that my progressbar doesn't move while downloading. i tryed the webclient Download Progress changed event but still no dice. Please help!!!
Public
Class Downloader Delegate Sub ChangeTextsSafe(ByVal length As Long, ByVal position As Integer, ByVal percent As Integer, ByVal speed As Double) Private Sub Download_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadSaveFileDialog1.Filter =
"Files(*.*)|*.*"SaveFileDialog1.FilterIndex = 1
SaveFileDialog1.RestoreDirectory =
True If SaveFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK ThenProgressBar1.Increment(
"30")WebClient1.DownloadFile(TextBox1.Text, SaveFileDialog1.FileName)
If My.Computer.FileSystem.FileExists(SaveFileDialog1.FileName) = True ThenProgressBar1.Increment(
"70") End IfTextBox1.Enabled =
False End If
End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
End Sub Private Sub WebClient1_DownloadFileCompleted(ByVal sender As Object, ByVal e As System.ComponentModel.AsyncCompletedEventArgs) Handles WebClient1.DownloadFileCompleted
ProgressBar1.Value =
"100" End Sub Private Sub WebClient1_DownloadProgressChanged(ByVal sender As Object, ByVal e As System.Net.DownloadProgressChangedEventArgs) Handles WebClient1.DownloadProgressChangedProgressBar1.Maximum = e.ProgressPercentage
ProgressBar1.Step = e.ProgressPercentage
ProgressBar1.Value = e.BytesReceived
End SubEnd
Class