title: threading and Winforms form redrawing
body: <p>I just wrote a simple app to learn multi-threading, and I'm missing something. I start a new thread that performs a relatively lengthy database operation (checking SharePoint permissions on users for a particular site), often up to fifteen seconds. This is how I am creating the thread (removing some extraneous code for simplicity):</p>
  
  <pre><code>private void btnSelectSite_Click(object sender, EventArgs e)
  {
      strSiteURL = txtSiteURL.Text;
  
      tmrProgressTimer.Interval = 1000;
      tmrProgressTimer.Enabled = true;
  
      ThreadStart starter = delegate { LoadUsers(strSiteURL); };
      Thread t = new Thread(starter);
      t.Start();
      t.Join();
  
      cboUsers.Items.Clear();
      cboUsers.Items.AddRange(list.ToArray());
  
      tmrProgressTimer.Enabled = false;
  }
  </code></pre>
  
  <p>I am using a delegate to fire off LoadUsers in its own thread, since LoadUsers requires a string. It populates a generic list ("list" in the code) and I later use that to populate a combobox. My understanding is that while this thread is processing, my UI shouldn't lock up, being as it is on its own thread; however, that has not been the case. None of the UI refreshes until after the thread finishes, and the app is locked up during the thread processing -- the timer never even fires, although it should be ticking every second and the database operation is taking up to fifteen. Could someone tell me what I'm doing wrong? </p>