If it is like this :
You could use a TableLayoutPanel or doing something like : (to be improved) =>
private void Form1_Load(object sender, EventArgs e)
{
this.ClientSize = new System.Drawing.Size(600, 300);
int nX = 4;
int nY = 4;
int nWidth = ClientSize.Width / 9 - 4;
int nHeight= ClientSize.Height / 3 - 4;
for (int i = 1; i <= 26; i++)
{
Button button1 = new System.Windows.Forms.Button();
button1.Location = new System.Drawing.Point(nX, nY);
button1.Name = "button" + i;
button1.Size = new System.Drawing.Size(nWidth, nHeight);
button1.TabIndex = i;
button1.Text = Encoding.ASCII.GetString(new byte[] { (byte)(i + 64) });
button1.UseVisualStyleBackColor = true;
Controls.Add(button1);
nX += nWidth + 4;
if (i % 9 == 0)
{
if (i < 18)
nX = 4;
else
nX = 4 + nWidth / 2;
nY += nHeight + 4;
}
}
CenterToScreen();
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
int nX = 4;
int nY = 4;
int nWidth = ClientSize.Width / 9 - 4;
int nHeight = ClientSize.Height / 3 - 4;
int i = 1;
foreach (Control item in this.Controls)
{
item.Location = new System.Drawing.Point(nX, nY);
item.Size = new System.Drawing.Size(nWidth, nHeight);
nX += nWidth + 4;
if (i % 9 == 0)
{
if (i < 18)
nX = 4;
else
nX = 4 + nWidth/2;
nY += nHeight + 4;
}
i++;
}
}