日期:2014-05-18 浏览次数:21039 次
using System;
using System.Windows.Forms;
namespace we
{
/*==============主程序入口========================*/
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
Console.ReadKey();
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
partial class Form1
{
//主体变量名
private System.ComponentModel.IContainer components = null;
//按扭变量名
private System.Windows.Forms.Button buttoww = new System.Windows.Forms.Button();
private void InitializeComponent()
{
buttoww.Location = new System.Drawing.Point(174, 205);
buttoww.Name = "checkBox1";
buttoww.Size = new System.Drawing.Size(75,23);
buttoww.TabIndex = 1;
buttoww.Text = "关上";
buttoww.UseVisualStyleBackColor = true;
buttoww.Click += new System.EventHandler(buttoww_Click);
//窗体
components = new System.ComponentModel.Container();
Text = "我的第一个程序";
//写入按扭
Controls.Add(buttoww);
}
//按扭响应事件
private void buttoww_Click(object sender, EventArgs e)
{
MessageBox.Show("还没有加数据");
}
}
}