private void Form2_Load(object sender, EventArgs e)
{
this.timer1.Start();
this.timer1.Enabled = true;
this.timer2.Enabled = true;
this.Opacity = 0.5;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (0<this.Opacity && this.Opacity<1)
this.Opacity = this.Opacity +0.01;
else if (this.Opacity==1)
{
//this.Close();
Form3 fc = new Form3();
fc.Show();
//this.Close();
}
}
执行完form1窗口的程序后打开form2窗口,form2窗口的load中的代码会执行,但timer控件没被激活,在timer-click事件设置断点不会执行,如果单独运行form2,imer控件会正常运行,请指教,谢谢