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 WindowsFormsApplication8
{
    public partial class Form1 : Form
    {
        //System.Windows.Forms.Button[,] Buttons;
        Button[,] Buttons = new Button[10,10];


        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //int i;
            //int j;
            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 * 70 + 10, j * 65 + 10);
                    this.Controls.Add(Buttons[i, j]);

                    int a = 70;
                    int b = 65;
                    int k;
                    k = i * j;
                    Buttons[i, j].Size = new System.Drawing.Size(a, b);
                    string varString = i.ToString();
                    string varString2 = j.ToString();
                    string varString3 = k.ToString();

                    Buttons[i, j].Text = varString + "*" + varString2 + "=" + varString3;



                }
            }
           
        }
    }
}

 

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

程式設計工藝大師:http://tccnchsu.blogspot.tw/

000  

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

using System;
using System.Collections.Generic;

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

using System;
using System.Collections.Generic;

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

using System;
using System.Collections.Generic;

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

«12