C#模仿卡巴基斯渐变窗体

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace 模仿卡巴基斯渐变窗体
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (this.Opacity > 0.1)
            {
                this.Opacity = this.Opacity - 0.02;
            }
            else
            {
                this.timer1.Enabled = false;
                Close();
            }
        }

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

        private void label1_Click(object sender, EventArgs e)
        {

        }
    }
}

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/jingang123gz/archive/2007/05/15/1609278.aspx

posted @ 2009-08-17 21:54  oraclejava  阅读(199)  评论(0)    收藏  举报