Form1中定义:
public static System.Windows.Forms.Button button1;
public partial class Form1 : Form
{
private int i = 0;
public Form1()
{
InitializeComponent();
button1.Text = "Start";
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2 ();
frm.Show();
}
}
//========================================================
public partial class Form2 : Form
{
/// <summary>
/// Required designer variable.
/// </summary>
public Form2 ()
{
InitializeComponent();
FormClosed += new FormClosedEventHandler(Form2 _FormClosed);
}
void Form2 _FormClosed(object sender, FormClosedEventArgs e)
{
Form1.button1.Text = "End";
}
}
删蒢┈记亿﹎ 镏下啲х`祗惿噎份 ┊ ☆ 曾经啲◇ˋ美恏徊亿`ヽ