title: Button BackColor Won't Change in Backgroundworker Completed Method
body: <p>1) I click the start connect button in my client program. I successfully set the start button backcolor to red.</p>
  
  <p>2) When the TCP connection is completed, a registration message is sent and it successfully changes the button backcolor to yellow.</p>
  
  <p>3) The server sends a registration ACK back to the client and that is processed in a backgroundworker (BGW). BGW sets a boolean variable SetConnectButton so that it is known registration was successful, then completes.</p>
  
  <p>4) The RunWorkerCompleted function is ran. The debug window displays "Lime" as it should, but the button color does not change. Here is the RunWorkerCompleted code.</p>
  
  <pre><code>static private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
          {
          if (SetConnectButton)
              {
              Debug.WriteLine("Lime");
              SetConnectButton = false;
              UIMain.btnServerConnect.BackColor = System.Drawing.Color.Lime;
              }
          }//close WorkerCompleted
  </code></pre>
  
  <p>As I understand it, the RunWorkerCompleted runs in the UI thread so this should work as is. Using Invoke made no difference, though I may not have done it right.</p>
  
  <p>Any clues?</p>