using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public void StworzPrzyciski()
{
Button[,] tab = new Button[11, 11];
for (int i = 0; i<11;i++)
{
for (int j = 0; j < 11; j++)
{
Controls.Add(tab[i, j]);
tab[i, j].Location = new Point(i, j);
tab[i, j].Size = new Size(20, 20);
}
}
}
private void Form1_Load(object sender, EventArgs e)
{
StworzPrzyciski();
}
}
}
Chciałbym stworzyć tablicę buttonów. Wiem, że będą się nachodzić na siebie bo jeszcze nie myślałem o ich lokalizacji. Nie wiem dlaczego program mi wyświetla puste Form1. Ktoś coś poradzi?