Wednesday, 20 April 2011

Animate Windows Form using C#.net


Animate Windows Form using C#.net





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

namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
         
            // Animate Windows Form using C#
            // Set Form's Transperancy 100 %
            this.Opacity = 0;
            this.BackColor = Color.Red;

            // Start the Timer To chane Form transperancy
            timer1.Enabled = true;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
           
            this.Opacity += 0.01;
        }

       
    }
}

No comments:

Post a Comment