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 _123
{
public partial class Form1 : Form
{
//System.Windows.Forms.Button Button1;
Button[,] Buttons = new Button[9, 9];
int width, height;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 9; i++)
{
for (int j = 0; j < 9; j++)
{
Buttons[i, j] = new Button();
width = this.Size.Width;
height = this.Size.Height;
width /= 10;
height /= 5;
Buttons[i, j].Size = new Size(width, height);
this.Controls.Add(Buttons[i, j]);
Buttons[i, j].Location = new Point(i * 80, j *100 );
}
}
//Button1 = new System.Windows.Forms.Button();
//Button1.Location = new Point(100, 100);
//this.Controls.Add(Button1);
//Button1.Click += new System.EventHandler(this.Button1_Click);
//Button[] btuArray = new Button[3];
}
private void Button1_Click(object sender, EventArgs e)
{
//MessageBox.Show("HELLO");
}
private void button1_Click_1(object sender, EventArgs e)
{
}
}
}
- Nov 28 Fri 2014 13:02
11.14
close
全站熱搜
留言列表