title: C# winform blink label backcolor with delay
body: <p>I have a winform application and I need to make the label backcolor blinking.  I am trying to do that using a for loop and a Thread.Sleep, but does not work.  Thank you for any help and advise:</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      for (int i = 0; i &lt; 10; i++)
      {
          System.Threading.Thread.Sleep(1000); // Set fast to slow.
          if (label1.BackColor == Color.Red)
              label1.BackColor = Color.Transparent;
          else
              label1.BackColor = Color.Red;
      }
  }   
  </code></pre>