title: C# How to move button controls from right to left with animation?
body: <p>I have array of buttons with location&amp;images then i want to see it moving from right to left, let's say 2seconds interval. Here is my relevant code.</p>
  
  <pre><code>    public partial class Form1 : Form
  {
      Button[] buttonanimal = new Button[21];
  
  
      public Form1()
      {
          InitializeComponent();
  
          for(int i=1;i&lt;=20;i++)
          {
              buttonanimal[i] = new Button();
              buttonprop(buttonanimal[i]);
  
              if(i&gt;=1&amp;i&lt;=4)
              {
                  Point[] points = new Point[4];
  
                  points[0] = new Point(100, 100);
                  points[1] = new Point(400, 100);
                  points[2] = new Point(700, 100);
                  points[3] = new Point(1000, 100);
  
                  buttonanimal[i].Visible = true;
                  buttonanimal[i].Location = points[i - 1];
              }
          }
      }
  
      private void buttonprop(Button buttons)
      {
          buttons.Size = new Size(100, 100);
          buttons.Visible = false;
          Controls.Add(buttons);
      }
  
  
      private void ButtonNext_Click(object sender, EventArgs e)
      {
          Point[] points = new Point[4];
  
          points[0] = new Point(100, 100);
          points[1] = new Point(400, 100);
          points[2] = new Point(700, 100);
          points[3] = new Point(1000, 100);
  
          for (int i=1;i&lt;=20;i++)
          {
              if(buttonanimal[i].Visible==true)
              {
                  buttonanimal[i].Visible = false;
  
                  buttonanimal[i + 1].Visible = true;
                  buttonanimal[i + 2].Visible = true;
                  buttonanimal[i + 3].Visible = true;
                  buttonanimal[i + 4].Visible = true;
  
                  buttonanimal[i + 1].Location = points[i - 1];
                  buttonanimal[i + 2].Location = points[i - 2];
                  buttonanimal[i + 3].Location = points[i - 3];
                  buttonanimal[i + 4].Location = points[i - 4];
  
                  break;
              }
          }
      }
  }
  </code></pre>
  
  <p>I have 4 visible button at the start. When you pressed ButtonNext. The first visible button(button1) at the left will gone and it will replace by button2 and so forth. I want too see the 4buttons moving from right to left.</p>