//淡入
public int state = 0;
private void f2_Load(object sender, EventArgs e)
{
this.Opacity = 0;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (state == 0)
{
this.Opacity += 0.02;
if (this.Opacity == 1)
{
state
= 1;
timer1.Enabled
= false;
}
}
else
{
this.Opacity = Opacity - 0.02;
if (this.Opacity == 0)
{
Application.ExitThread();
}
}
}
//退出
private void f2closing(object sender, FormClosingEventArgs e)
{
e.Cancel
= true;
timer1.Start();
}

相关文章:

  • 2022-02-18
  • 2022-12-23
  • 2021-11-08
  • 2021-09-21
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
猜你喜欢
  • 2021-09-23
  • 2022-12-23
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
相关资源
相似解决方案