9x9乘法表  

====================================================================

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
{
Button[,] buttons = new Button[9, 9];
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{
// Instantiating all the buttons in the array
for (int i = 0; i < 9; i++)
{
for (int j = 0; j < 9; j++)
{
buttons[i, j] = new Button();
buttons[i, j].Location = new Point(i * 50, j * 50);
buttons[i, j].Size = new Size(50, 50);
this.Controls.Add(buttons[i, j]);
}
}

}
}
}

arrow
arrow
    全站熱搜

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