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

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...

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

nice, job,.. pretty cool......

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)

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

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...

i want this project source code .can u send me

hiiiiiii how v wl change d image for our splash screen.... thanx

thnx Harmandeep Singh)

wish your code will succesfull function

I have a problem in coding the codes of splash sceen,please help.

very nice tutorial.......

Since from 2 days i m trying alot to execute the code,but no result i got, but thanx to u.....My Sir....

i have vs2008 professional edition...when i click on the new item control i dont get the option of splash screen..what to do?

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

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.

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

what is the code for splash screen

Add new comment