title: How to rotate image in picture box
body: <p>I am making a winforms application. One of the features I hope to implement is a rotating gear on the home form.</p>
  
  <p>When the home form is loaded, you should hover over the picture of the gear, and it should rotate in place. </p>
  
  <p>But all I have so far is the RotateFlip and that just flips the picture.</p>
  
  <p>Is there a way to make the gear turn in place when the mouse is hovering over it?</p>
  
  <p>The code I have so far is:</p>
  
  <pre><code>Bitmap bitmap1;
      public frmHome()
      {
          InitializeComponent();
          try
          {
              bitmap1 = (Bitmap)Bitmap.FromFile(@"gear.jpg");
              gear1.SizeMode = PictureBoxSizeMode.AutoSize;
              gear1.Image = bitmap1;
          }
          catch (System.IO.FileNotFoundException)
          {
              MessageBox.Show("There was an error." +
                  "Check the path to the bitmap.");
          }
      }
  
      private void frmHome_Load(object sender, EventArgs e)
      {
          System.Threading.Thread.Sleep(5000);
      }
  
      private void frmHome_FormClosed(object sender, FormClosedEventArgs e)
      {
          Application.Exit();
      }
  
      private void pictureBox1_MouseHover(object sender, EventArgs e)
      {
  
          bitmap1.RotateFlip(RotateFlipType.Rotate180FlipY);
          gear1.Image = bitmap1;
      }
  </code></pre>
  
  <p>Like I said, I just want to turn the gear. I am trying to do this in a Windows Form application. Using C#. Framework 4</p>