Help with downloading with progressbar
<p>Im trying to make a simple downloader, but i cant make it to update the GUI elements in my Form (<code>Form1</code>).</p>

<p>In the constructor for Form1 i call thread:</p>

<pre><code>        Thread t = new Thread(new ThreadStart(fetch));
        t.Start();
</code></pre>

<p>And fetch looks something like this:</p>

<pre><code>private void fetch()
{
        try
        {
            WebClient webClient = new WebClient();
            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(webClient_DownloadProgressChanged);
            webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(webClient_DownloadFileCompleted);
            webClient.DownloadFile(updateurl, @"foo.iso");
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message + "\n\n" + ex.InnerException.ToString());
        }
}
</code></pre>

<p>None of the events are triggered... altho, by looking at the foo.iso in the folder i see the file increase in size.</p>

<p>One of the events looks like this:</p>

<pre><code>void webClient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{   
    progressBar.Value = (int)(e.BytesReceived * 100 / e.TotalBytesToReceive);

    statusLabel.Text = "Downloading";
    descLabel.Text = progressBar.Value + " % complete";
}
</code></pre>
