分类目录

链接

2011 年 6 月
 12345
6789101112
13141516171819
20212223242526
27282930  

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > .NET > 正文
C#窗体淡入淡出
.NET 暂无评论 阅读(1,858)
//淡入publicint state =0;
privatevoid f2_Load(object sender, EventArgs e)
{
         this.Opacity =0;
}
privatevoid 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();
         }
}
}
//退出
privatevoid f2closing(object sender, FormClosingEventArgs e)
{
          e.Cancel =true;
         timer1.Start();
}

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:C#窗体淡入淡出 | Bruce's Blog

发表评论

留言无头像?