using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace FormsTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent(); //初始化控件
}
private void button1_Click(object sender, EventArgs e) // button1
的單擊事件
{
MessageBox.Show("你單擊了左邊的button1按鈕。"); //彈出消息框
}
private void button2_Click(object sender, EventArgs e) // button2
的單擊事件
{
MessageBox.Show("你單擊了右邊的button2按鈕。"); //彈出消息框
}
}
}