title: Dynamically changing image in a picturebox
body: <p>I'd like to run a piece of code which keeps changing the picture of a picturebox (like a rotating propeller) until the form is closed.</p>
  
  <p>I managed to change the picture of the PictureBox with an EventHandler, but I don't know how to go along.</p>
  
  <pre><code>    public Form1()
      {
          InitializeComponent();
          this.Controls.Add(pb);
      }
  
      PictureBox pb = new PictureBox
      {
          Location = new Point(0, 0),
          SizeMode = PictureBoxSizeMode.Zoom,
          Size = new Size(300,300),
          ImageLocation = @"E:\folder\gas_jo.png"
      };
  
      private void Form1_Click(object sender, EventArgs e)
      {
          if (pb.ImageLocation == @"E:\folder\gas_jo.png")
          {
              pb.ImageLocation =@"E:\folder\gas_jo_1.png";
          }
          else if (pb.ImageLocation == @"E:\folder\gas_jo_1.png")
          {
              pb.ImageLocation = @"E:\folder\gas_jo.png";
          }
      }
  </code></pre>