SIGN UP MEMBER LOGIN:    
ARTICLE

Animating Window Form (Fade Effect)

Posted by Kirtan Patel Articles | Windows Forms C# March 04, 2010
Here in this article we are going to make the fade effect animation in windows form.
Reader Level:
 

Introduction

To make application look better we have use some eye candy to it. Like in some crack program you have seen when they start they are visible smoothly. Here we are going to make the same fade effect animation using very simple code.

Form while initializing ...                                               form after fade effect..

1.gif

Technologies:

Windows Form .net 2.0/3.5

Language:

C# 

Prerequisite

1.NET Framework 2.0/3.5
2. Visual Studio 2005/2008

Implementation

It is very simple to use this code just 2-4 line of code

1.timer 
2.form

-> start with new windows form project 

-> drag drop timer component from the toolbar on to form say timer1

Now to display fade effect we should first make the form 100% transparent then after the form will be displayed smoothly.

To do so in form' load event write code like below

private void Form1_Load(object sender, EventArgs e)
{
    // Set Form's Transperancy 100 %
    this.Opacity = 0;

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

And in timer's tick Event Write code like below.

private void timer1_Tick(object sender, EventArgs e)
{
    // Make Form Visible a Bit more on Every timer Tick
    this.Opacity += 0.07;
}

Run Project you are done!!

Login to add your contents and source code to this article
share this article :
post comment
 

very good

Posted by Nilesh tarwatkar Jan 26, 2011

when i want to open the project , a error has been displayed that " unable to read the project file, the imported project was not found . confirm the path in the <import> declaration is correct.and that the file exist on the disk." and i can't open the project.

Posted by koushik bug Dec 19, 2010

thanks :)

Posted by Kirtan Patel Oct 18, 2010

Very nice article i like it so much
thanks

Posted by abhi abhi Oct 11, 2010
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Nevron Gauge for SharePoint
Become a Sponsor