title: How to reset a picture boxes position back to the left side of the form?
body: <p>I'm creating a basic racing game in C# for an assignment where two picture boxes race from the left side of the form to the right side. What I am struggling with is resetting the position back to the 1st pixel on the left side of the form once the picture box has reached the end of the form on the right side. At the moment the picture boxes just keep going right and then disappear from the form and never come back.</p>
  
  <p>That is what the layout of the game looks like:</p>
  
  <p><a href="https://i.stack.imgur.com/CuwoI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CuwoI.jpg" alt="enter image description here"></a></p>
  
  <p>I've tried searching google for snippets of code or even examples on how I might achieve this and have yet to find anything.</p>
  
  <p>Any help would be much appreciated. </p>
  
  <pre><code>public partial class frmRacing : Form
  {
      public frmRacing()
      {
          InitializeComponent();
      }
  
      //This is the segment of intergers and the randomizer.
      Random r = new Random();
      int dir = 1;
      int min, sec, ms = 0;
  
      private void btnExit_Click(object sender, EventArgs e)
      {
          this.Close();
      }
  
      //This is the timer for "Player One". It moves the players picture box across the form at a random speed between 1-10 and times how long it takes to complete the total laps.
      private void tmrOne_Tick(object sender, EventArgs e)
      {
          dir = r.Next(1, 10);
          picStark.Left += dir;
          lblTimer1.Text = min + ":" + sec + ":" + ms.ToString();
          ms++;
  
          if (ms &gt; 100)
          {
              sec++;
              ms = 0;
          }
  
          else
          {
              ms++;
          }
  
          if (sec &gt; 60)
          {
              min++;
              sec = 0;
          }
      }
  
      //This is the timer for "Player Two". It moves the players picture box across the form at a random speed between 1-10 and times how long it takes to complete the total laps.
      private void tmrTwo_Tick(object sender, EventArgs e)
      {
          dir = r.Next(1, 10);
          picLannister.Left += dir;
          lblTimer2.Text = min + ":" + sec + ":" + ms.ToString();
          ms++;
  
          if (ms &gt; 100)
          {
              sec++;
              ms = 0;
          }
  
          else
          {
              ms++;
          }
  
          if (sec &gt; 60)
          {
              min++;
              sec = 0;
          }
      }
  
      //This is the start button. It enables all the timers and starts the race.
      private void btnStart_Click(object sender, EventArgs e)
      {
          tmrOne.Enabled = true;
          tmrTwo.Enabled = true;
          tmrThree.Enabled = true;
      }
  
      private void hsbLaps_Scroll(object sender, ScrollEventArgs e)
      {
          lblLaps3.Text = lblLaps3.Text + 1;
      }
  
      //This is the overall timer for the race.
      private void tmrThree_Tick(object sender, EventArgs e)
      {
          lblTimer3.Text = min + ":" + sec + ":" + ms.ToString();
          ms++;
  
          if (ms &gt; 100)
          {
              sec++;
              ms = 0;
          }
  
          else
          {
              ms++;
          }
  
          if (sec &gt; 60)
          {
              min++;
              sec = 0;
          }
      }
  }
  </code></pre>