title: Simple button animations
body: <p>I am trying to learn <code>.NET</code> programming.  As a part of my learning, I tried to make some effects on buttons.  It is working... but not as smooth as I imagined!  Is there any better way to do this?  Thank you in advance!</p>
  
  <p>My need:</p>
  
  <p>There are 3 buttons.
  When you hover the mouse over one of them, it expands and when you mouse out from that button, it returns to its initial size.</p>
  
  <pre><code>private void button1_MouseHover(object sender, EventArgs e)
      {
          button1.BackColor = Color.White;
          button1.Width = 130;
          button1.BringToFront();            
      }
  
      private void button1_MouseLeave(object sender, EventArgs e)
      {
          button1.BackColor = Color.Red;
          button1.Width = 75;         
      }
  
      private void button2_MouseHover(object sender, EventArgs e)
      {
          button2.BackColor = Color.Gray;
          button2.Width = 130;
          button2.BringToFront();            
      }
  
      private void Form1_MouseLeave(object sender, EventArgs e)
      {
          button2.BackColor = Color.Red;
          button2.Width = 75;
  
      }
  
      private void button3_MouseHover(object sender, EventArgs e)
      {
          button3.BackColor = Color.DimGray;
          button3.Width = 130;
          button3.BringToFront();
      }
  
      private void button3_MouseLeave(object sender, EventArgs e)
      {
          button3.BackColor = Color.Red;
          button3.Width = 75;
  
      }
  </code></pre>