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

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - 玄新

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;
  }