Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Đặt thử t
- int size = 25, row = 10, col = 10;
- /*****************************************************/
- //đoạn tạo button nek.
- for (int i = 0; i < col; i++)
- {
- for (int j = 0; j < row; j++)
- {
- Button cell = new Button();
- cell.Size = new Size(size, size);
- cell.Location = new Point(j * size, i * size+ 20);
- //cell.Text = i.ToString() + j.ToString();
- //cell.Click += Bam;
- this.Controls.Add(cell);
- }
- }
- //hàm bấm.
- void Bam(object sender, EventArgs e)
- {
- Button btn = sender as Button;
- MessageBox.Show(btn.Text);
- btn.Enabled = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement