//淡入
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();
}
C#窗体淡入淡出
参考资料:
-------------------------------------------------------------------------------------------------------------------------------------------------
数据库优化
数据库教程
数据库实战经验分享博客
-------------------------------------------------------------------------------------------------------------------------------------------------
数据库优化
数据库教程
数据库实战经验分享博客