title: Make progress bar display download status
body: <p>I am making a winform program that can download updates.</p>
  
  <p>I am trying to make a progressbar that shows the status of the download. I wrote the exact same as all others i saw 
  (diffrent download url ofcourse: <a href="https://dl.dropboxusercontent.com/.../update.xml?token_hash=SOME_HASH&amp;dl=1" rel="nofollow">https://dl.dropboxusercontent.com/.../update.xml?token_hash=SOME_HASH&amp;dl=1</a>) </p>
  
  <p>I suppose its the correct link to use, since its the direct download link.</p>
  
  <p>I dont know if this is important, but the form that downloads the update.xml file, is not my main form. Other people i saw, wrote the code it in the main form. My main form has a "check for updates" button, and that button opens the update form.</p>
  
  <p>I am using: System.Net and all default "usings" when you create a winform form.</p>
  
  <pre><code>public partial class Update : Form
  {
      public Update()
      {
          InitializeComponent();
      }
  
      private void Update_Load(object sender, EventArgs e)
      {
          WebClient client = new WebClient();
          string desktop = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
          client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
          client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted);
          client.DownloadFileAsync(new Uri("https://dl.dropboxusercontent.com/s/.../update.xml?token_hash=...&amp;dl=1"), desktop);
      }
  
      void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
      {
          progressBar1.Maximum = (int)e.TotalBytesToReceive / 100;
          progressBar1.Value = (int)e.BytesReceived / 100;
      }
  
      void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
      {
          label2.Text = "Download Completed";
      }
  }
  </code></pre>
  
  <p>This is taken from somone who made it work, but it still don't work for me! (Programming in a nutshell :D)</p>
  
  <p>Any help will be appreciated, thanks in advance!</p>
  
  <p>EDIT: I am sorry that i wasn't clear enought before. The file didn't even download, thats the problem. But it is fixed now anyways.</p>
  
  <p>I will keep that in mind if i should need more help.</p>