close

1114  

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 WindowsFormsApplication6
{
public partial class Form1 : Form
{
Button[,] buttons = new Button[10, 10];
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
for (int i = 1; i < 10; i++)
{
for (int j = 1; j < 10; j++)
{
buttons[i, j] = new Button();
buttons[i, j].Location = new Point(i * 30, j * 30);
buttons[i, j].Size = new Size(30, 30);
buttons[i, j].Text = Convert.ToString(i * j);

this.Controls.Add(buttons[i, j]);
}

}
}
}
}

arrow
arrow
    全站熱搜

    芫兒 發表在 痞客邦 留言(0) 人氣()