Adding a Splash Screen to Your Project

  1. Start VB.Net and open your existing project (anyone you like).
  2. Note that by default VB.Net expects the start up form to be Form1 - you will have to change this once your new "splash" form is finished.
  3. Add a new form (Form 2) by Project - Add windows form - add form.
  4. Size your new form and add whatever controls you want to have on it (labels / pcitures).
  5. Find the Timer on your list of controls and add that to the form. Note that when you click on the Form to add it the timer drops to below the form - don't panic.
  6. The timer properties should be set as
    Name - timrWait
    Enabled - True
    Interval - 3000 (100 = .1 of a second - this will give a 3 second delay)
  7. Double click the timer to open the code window and add the following code

    Me.Hide() 'this form is no longer required
    Form1.Show() 'switch to main form

End Sub

This will switch to the other (main) form where you will run your main application. Note that if you use the Me.close event then the form will close but the application will still be running.

Select form 1 code window and add ALL of this code at the top of the code page under the Public Class Form 1 heading. Do not click on the form to open the window as this creates a code segment called Form Load.

Private Sub Form1_Closed(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Closed
End 'closing Form1 is the end of the application
End Sub

Now when you click on your close / end button on Form 1 the whole application will close.

The last step before testing is to change your start up form to Form2. Locate your solution explorer on the right hand side of the screen, and note at the top is the title of your project. Right mouse click and select properties. Change the start up form to Form2 then close the window.

Save and test your project.