Friday, March 2, 2007

Spalsh Screen -C#

It is a good idea to create splash screen when you loading data on the main form. So splash screen resides till the data loaded on the screen.

Fist design a form then set formborderstyle property to "SizableToolWindow"
set ControlBox Property to "False"
set StartPosition Property to "CenterScreen"
set WindowState Property to "Normal"

Import following name space with using directive


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


then write following code on the your main forms load event


FrmSplash frm = new FrmSplash();
frm.Show();
Application.DoEvents();
Application.DoEvents();
Application.DoEvents();
Application.DoEvents();
Application.DoEvents();
Application.DoEvents();

////do your work here you can put your code to load data
Application.DoEvents();
Application.DoEvents();
Application.DoEvents();
Application.DoEvents();
Application.DoEvents();
frm.Close();
Share:

0 comments:

Post a Comment

Your feedback is very important to me. Please provide your feedback via putting comments.

Search This Blog
Loading...
About Me
My Photo

Full Stack Developer,Blogger,Microsoft Mvp, Mentor, Life long learner, 10+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC,Web Forms,C#,AngularJs,Golang
Mvp profile
Subscribe to my blog

Enter your email address:

Follow us on facebook
Blog Archive
Total Pageviews