惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
The Cloudflare Blog
量子位
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
D
DataBreaches.Net
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
U
Unit 42
博客园 - 聂微东
有赞技术团队
有赞技术团队
A
About on SuperTechFans

博客园 - 玄新

asp.net 2.0 中加密web.config 文件中的配置节 Windows DNA架构 如何使用 Visual C# .NET 检查 Windows 版本[转] 使用DirectoryServices给文件添加访问权限 - 玄新 - 博客园 使用WMI来获取CPU序列号 - 玄新 - 博客园 什么是WMI C#读取设备信息(源代码下载) 格式化日期型数据 用 javascript显示时间日期代码(来自网上) - 玄新 - 博客园 昨天发现System.Diagnostics.Process 一样的可以打开一个网页的,直接的输入网页的地址就好了 - 玄新 - 博客园 文本框输入限制大全 在b/s开发中经常用到的javaScript技术 文本框里只能输入数字和退格键 (datagridview)如果单击列表头,全选.(第一列为复选框) DataGridView新特色(vs2005) excel 导入导出access数据库(winform) 递归得到叶子节点。 验证手机号码,小灵通号码函数 如何在SQL中对行进行动态编号
实现窗体淡入淡出的完整代码
玄新 · 2007-01-30 · via 博客园 - 玄新

private bool isclose=false;
  private bool canclose=false;

  private void timer1_Tick(object sender, System.EventArgs e)
  {
   if(this.Opacity<1)
   {
    if(this.isclose)
    {
     this.timer1.Enabled=false;
     this.timer2.Enabled=true;
    }
    this.Opacity+=0.1;
   }
   else
   {
    this.timer1.Enabled=false;
   }
  }

  private void timer2_Tick(object sender, System.EventArgs e)
  {
   if(this.Opacity>0)
   {this.Opacity-=0.1;}
   else
   {
    this.timer2.Enabled=false;
    this.canclose=true;
    this.Close();
   }
  }

  private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
  {
   if(this.timer1.Enabled)
   {
    e.Cancel=true;
    this.isclose=true;
   }
   else
   {
    if(!this.canclose)
    {
     e.Cancel=true;
     this.timer2.Enabled=true;
    }
   }
  }

  private void Form1_Load(object sender, System.EventArgs e)
  {
   this.Show();
   this.timer1.Enabled=true;
  }