How to show download progress in progressbar? Visual Basic
<p>im so confused because this code didn't work. It downloaded the file successfully but don't report the progress to the <code>ProgressBar</code>. I already started <code>Timer1</code> using <code>Timer1.Start()</code> before <code>BackgroundWorker2.RunWorkerAsync()</code>  .</p>

<pre><code>Dim size As Double
Private Sub BackgroundWorker2_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker2.DoWork
    Try
        Dim G As Integer = 150
        Dim Increase As Boolean = True
        Do Until Clicked = True
            If Increase = True Then
                If Not G = 255 Then
                    G += 1
                    Threading.Thread.Sleep(10)
                Else
                    Increase = False
                End If
            Else
                If Not G = 150 Then
                    G -= 1
                    Threading.Thread.Sleep(10)
                Else
                    Increase = True
                End If
            End If
            Label6.ForeColor = Color.FromArgb(0, G, 0)
        Loop
        Label6.Cursor = Cursors.Default
        Label6.Text = "Initializing"
        Label6.ForeColor = Color.Lime
        MessageBox.Show("Description :" &amp; Environment.NewLine &amp; Description &amp; Environment.NewLine &amp; Environment.NewLine &amp; "Total Size: " &amp; Environment.NewLine &amp; TotalSize &amp; Environment.NewLine &amp; Environment.NewLine &amp; "Download Link (Global): " &amp; Environment.NewLine &amp; DownlaodLink, "BIOS Update Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
        'WebBrowser1.Navigate(DownlaodLink)
        'BackgroundWorker1.RunWorkerAsync()
        ProgressBar1.Visible = True
        size = TotalSize.Replace(" MBytes", "")
        Me.Refresh()
        Dim wc As New WebClient
        wc.DownloadFileAsync(New Uri(DownlaodLink), My.Computer.FileSystem.SpecialDirectories.Desktop &amp; "\A55BM-E BIOS " &amp; LatestVersion.ToString.Replace(" ", "") &amp; ".zip")
    Catch ex As Exception
        MsgBox(ex.Message)
    End Try
</code></pre>

<p>And the code to show me the progress of my download </p>

<pre><code>Dim cursize As Double
Dim finsize As Double
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
    If System.IO.File.Exists(My.Computer.FileSystem.SpecialDirectories.Desktop &amp; "\A55BM-E BIOS " &amp; LatestVersion.ToString.Replace(" ", "") &amp; ".zip") Then
        cursize = My.Computer.FileSystem.GetFileInfo(My.Computer.FileSystem.SpecialDirectories.Desktop &amp; "\A55BM-E BIOS " &amp; LatestVersion.ToString.Replace(" ", "") &amp; ".zip").Length
        finsize = cursize / size * 100

        If Not ProgressBar1.Value = ProgressBar1.Maximum Then
            ProgressBar1.Value = finsize
            ProgressBar1.Refresh()
        Else
            ProgressBar1.Value = finsize
            ProgressBar1.Refresh()
            Timer1.Stop()
            MsgBox("Finished Downloading")
        End If
    End If
End Sub
</code></pre>

<p>I can't figure out how to make this work. Can someone help me?</p>