Click here to Skip to main content
15,897,187 members
Articles / Programming Languages / C#

Creating a Splash Screen that Runs Without a Message Pump

Rate me:
Please Sign up or sign in to vote.
4.83/5 (45 votes)
14 Mar 2007CPOL8 min read 190K   3K   227  
How to create a Splash Screen that can start before the main application thread
'
' * Created by SharpDevelop.
' * User: mjackson
' * Date: 25/10/2006
' * Time: 08:14
' * 
' * To change this template use Tools | Options | Coding | Edit Standard Headers.
' 


Imports System
Imports System.Collections.Generic
Imports System.Drawing
Imports System.Windows.Forms


	''' <summary>
	''' Description of MainForm.
	''' </summary>
	Public Partial Class MainForm

		Public Sub New()
			'
			' The InitializeComponent() call is required for Windows Forms designer support.
			'

			InitializeComponent()
		End Sub

		Protected Overloads Overrides Sub OnLoad(ByVal e As EventArgs)
			MyBase.OnLoad(e)
			'Emulate a slow loader
			System.Threading.Thread.Sleep(2000)
			Splash.Fadeout()
		End Sub
	End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
United Kingdom United Kingdom
Unfortunately my real name was already in use as a code project login. For those of you who are wondering I am really Napoleon Solo. Sorry, I mean, Mark Jackson. Well, I do look a bit like him I think.

Comments and Discussions