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.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews