how to move anew button at run time? <p>I have a problem with my winform c# project.</p> <p>I want to move new button that I made at run time around the form. How can I do that?</p> <pre><code> Button[] buttons = new Button[1000]; int counter = 0; Button myText = new Button(); private void button2_Click(object sender, EventArgs e) { Button myText = new Button(); myText.Tag = counter; myText.Location = new Point(x2,y2); myText.Text = Convert.ToString(textBox3.Text); this.Controls.Add(myText); myText.MouseMove += new MouseEventHandler(myText_MouseMove); myText.MouseDown += new MouseEventHandler(myText_MouseDown); buttons[counter] = myText; counter++; } public void myText_MouseMove(object sender, MouseEventArgs e) { int s = e.GetHashCode(); int check = 0; for (int i = 0; i &lt; counter; i++) { if (buttons[i].GetHashCode() == s) check = i; } if (e.Button == MouseButtons.Left) { buttons[check].Left += e.X - move.X; buttons[check].Top += e.Y - move.Y; } } void myText_MouseDown(object sender, MouseEventArgs e) { move = e.Location; } </code></pre> <p>I use that code to make the new button and tring move him. Now I want to move it around the form.</p> <p>If i do that just to one button, I can move it, but if it's more then one, that is a problem.</p> <p>If someone could give the code,fix him or just help me it will be very good for me! tnx :)</p>