111,126
社区成员
发帖
与我相关
我的任务
分享
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
Form1 f1 = new Form1();
private void button1_Click(object sender, EventArgs e)
{
f1.Tag = 3;
}
private void Form2_Load(object sender, EventArgs e)
{
f1.Show();
}
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
this.label1.Text = this.Tag.ToString();
}
private void Form1_Load(object sender, EventArgs e)
{
this.timer1.Start();
}
}