title: how to use a timer to make text move from side to side?
body: <p>I have a label that I am trying to move side to side. I got it to work with a while (true) loop but decided to try and use a timer instead.</p>
  
  <pre><code>    private int x = 0;
      private int y = 11;
      private void timer1_Tick(object sender, EventArgs e)
      {
          if (x &lt;= 11)
          {
              x++;
              string ping = new string(' ', x) + "ping";
              label2.Text = ping;
          }
          else if (y &gt;= 0)
          {
              y--;
              string pong = new string(' ', y) + "pong"; // this is where the exceptions given
              label2.Text = pong;
          }
  </code></pre>
  
  <p>that is as far as I have gotten it works sorta but after it does it once it throw the exception</p>
  
  <p>'count' must be non-negative.</p>
  
  <p>I am not sure how to fix this any help would be great.</p>