title: How Can I Add multipe buttons on c# dynamically using point class?
body: <p>Hello I try to add multiple Buttons on a panel on form and next to each other but instead it put them above each other.
  I am using the following function.
  the Code:</p>
  
  <pre><code>    private void CreatBtn()
      {
          Point[] p = new Point[6];
          string log = "";
         Form2 frm2 = new Form2();
  
          Button[] btn = new Button[6];
          for (int i = 0; i &lt; btn.GetLength(0); i++)
          {
                  btn[i] = new Button();
                  btn[i].Height = 65;
                  btn[i].Width = 80;
  
                  p[i] = new Point();
                  p[i].X = i * 83;
  
                  p[i].Y =0;
  
                  log +=p.ToString() +"\n";
                  btn[i].PointToClient(p[i]);
                  btn[i].Show();         
          }
  
          panel1.Controls.AddRange(btn);
  
      }
  </code></pre>