I'm really new to C# coding. I got an array of buttons and I want to move the button I'm left clicking by mouse. Any advice?
private void CreateTable(Button[] Tabla)
{
int horizotal = 45;
int vertical = 45;
for (int i = 0; i < Tabla.Length; i++)
{
Tabla[i] = new Button();
Tabla[i].BackColor = Color.Azure;
Tabla[i].Size = new Size(45, 45);
Tabla[i].Location = new Point(horizotal, vertical);
if ((i == 14) || (i == 29) || (i == 44) || (i == 59) || (i == 74) ||
(i == 89) || (i == 104) || (i == 119) || i == 134 || i == 149 || i == 164 || i == 179 || i == 194 || i == 209)
{
vertical = 45;
horizotal = horizotal + 45;
}
else
vertical = vertical + 45;
this.Controls.Add(Tabla[i]);
}
}
This is the code that creates my buttons.