Check out and contribute to CodePedia, the wiki for developers.
*/

Other Views

corner
*/

WinForm FAQ - Creating a Splash Screen

How do I make a splash screen in my win form application?

There is no built-in support for the splash screen in the Microsoft.NET win form applications. However, you can create a splash screen by creating a form with no title bar (by setting its FormBorderStyle to None), making it not appear in the taskbar (by setting its ShowInTaskbar property to false), making it the top most form (by setting) its TopMost property to true, and making it appear on the center of the screen (by setting its StartupPosition as CenterScreen).



You can now show this splash form when the main application is loading.

C# Version

private void Form1_Load(object sender, System.EventArgs e)
{
	this.Hide();
	Form2 frmSplash = new Form2();
	frmSplash.Show();
	frmSplash.Update();
	Thread.Sleep(5000);
	frmSplash.Close();
	this.Visible = true;
}


VB.NET Version

Private Sub Form1_Load(ByVal sender As System.Object, _
             	yVal e As System.EventArgs) Handles MyBase.Load
Me.Hide()
Dim frmSplash As New Form2
frmSplash.Show()
frmSplash.Update()
Thread.Sleep(5000)
frmSplash.Close()
Me.Visible = True
End Sub


Index
corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.
Resource Listings