title: How to create animated glow effect on Button Hover with C#?
body: <p>I am creating a <strong>CustomButton</strong> control for my application. Now, What I want to do that when the mouse goes on the button it should show glow effect and when mouse leave it should get back to normal. But the glow effect should not displayed immediately. It should display with animation. just like <strong>Chrome Browser Tab Page</strong>. I have tried this logic in the button control. </p>
  
  <p>This is my logic. But, I think this is not a proper way. please suggest proper way to get glow effect.</p>
  
  <pre><code>private void ShowGlow()
  {
      for (int i = 0; i&lt;50; i+= 5)
      {
           Sleep(100);
           Graphics g = this.CreateGraphics();
           Color color = Color.FromArgb(i, 150,150,25);
           g.FillRectangle(new SolidBrush(color), this.ClientRectangle);
      }
  }
  </code></pre>
  
  <p><strong>Additional Details</strong>
  Visual Studio 2005, Windows XP, Windows Form Controls</p>