How to Create a Splash Screen in VB.NET

In Visual Basic 6.0, you need to insert a code in your startup object in order to run your splash screen or make your splash screen form as the startup object. In VB.NET, there is an option in the My Project Properties to specify the startup object and the splash screen. You can also insert a code to delay the splash screen.

First you need to add a splash screen to your project.

 

 

After that, open the project properties.

Select a project in Solution Explorer, and then on the Project menu, click Properties.

Select the Application page.

 

 

As you can see you can specify the form in the startup object and a splash screen under the Windows application framework properties. This way you do not need to add a line of code in your startup object to show the splash screen.

To add a delay in the splash screen click the View Application Events button and type the code as shown below:

Protected Overrides Function OnInitialize( _

    ByVal commandLineArgs As  _

    System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean

            ' Set the display time to 5000 milliseconds (5 seconds). 

            Me.MinimumSplashScreenDisplayTime = 5000

            Return MyBase.OnInitialize(commandLineArgs)

End Function

 

 

The Me.MinimumSplashScreenDisplayTime = 5000 will delay the display of your splash screen by 5 seconds. If you want to increase the delay, then increase it by 1000. 1000 is equals to 1 secs.

Now, when you run your project the first object that will show is the Splash Screen.

Comments

Submitted byAnonymous (not verified)on Mon, 04/13/2009 - 10:50

I'm using VB.NET 2008, I don't know if that's the problem, and either way doesn't changed the time the splash screen is displayed at the start up. What it does is show the splash screen when the application is closing, and then it does vary the time showing it if I change the value .... any idea...
Submitted byAnonymous (not verified)on Fri, 07/31/2009 - 11:37

If I want to Use A loginForm before Splash Screen,How I do? My means that when you finished the password and account 's input,program close the Login Form and run Splash screen.I don't know how to make that
Submitted byAnonymous (not verified)on Tue, 01/19/2010 - 14:28

nice, job,.. pretty cool......
Submitted bywalkbondon Wed, 03/17/2010 - 15:58

Ok, i've added a splashcreen to my project and set it to run on startup, but the problem is, IT DOES NOT DISPLAY FOR THE STATED 2 SECONDS....IT DISPLAYS FOREVER..What may be the cause?? (VB.NET 2008)
Submitted byAnonymous (not verified)on Tue, 04/20/2010 - 15:27

This splash screen timer tutorial was really great! THe way of explaining CAN NOT BE BETTER THAN THIS!! THANKS ALOT for all the screen shots. Regards Seema
Submitted byAnonymous (not verified)on Sun, 12/12/2010 - 15:50

hi am a tybsc student my project is on jewellery shop management system in vb.net as front end and sql as backend plz help me to do d project...
Submitted byAnonymous (not verified)on Sun, 12/12/2010 - 16:00

hiiiiiii how v wl change d image for our splash screen.... thanx
Submitted byAnonymous (not verified)on Thu, 12/23/2010 - 18:14

thnx Harmandeep Singh)
Submitted byAnonymous (not verified)on Thu, 03/03/2011 - 14:36

wish your code will succesfull function
Submitted byAnonymous (not verified)on Tue, 06/21/2011 - 23:05

I have a problem in coding the codes of splash sceen,please help.
Submitted byAnonymous (not verified)on Wed, 08/17/2011 - 18:24

very nice tutorial.......
Submitted byPankaj Mohite (not verified)on Thu, 12/15/2011 - 13:37

Since from 2 days i m trying alot to execute the code,but no result i got, but thanx to u.....My Sir....
Submitted bysatvik (not verified)on Sun, 04/01/2012 - 18:14

i have vs2008 professional edition...when i click on the new item control i dont get the option of splash screen..what to do?
Submitted byMudoch (not verified)on Sat, 08/04/2012 - 19:47

For VS2010 this method will not work, the designer code is re-generated with every build. I did find a solution by searching on the MinimumSplashScreenDisplayTime. In short do everything up to and including step 3. Now while on that screen click on the "View Application Events" button and add this code inside the Partial Friend Class MyApplication .... End Class lines:
  1. Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
  2. ' Set the display time to 5000 milliseconds (5 seconds).
  3. Me.MinimumSplashScreenDisplayTime = 5000
  4. Return MyBase.OnInitialize(commandLineArgs)
  5. End Function
Submitted byAnonymous (not verified)on Sat, 07/13/2013 - 03:54

I got the splash screen to work but I'd like its functionality to more like that of prof. apps. Also, I can't seem to get the bg color set to transparent. I'm using VS 2012.
Submitted byFlako (not verified)on Wed, 11/06/2013 - 08:21

My splash screen works perfectly but my mdi form is shown in front my splash screen form. any idea what i'm doing wrong?? i've this: startup form: MDImain.vb Splash Screen: frmSplashScr.vb i've Visual Studio 2010
Submitted bylima (not verified)on Mon, 08/04/2014 - 17:07

what is the code for splash screen

Add new comment