Splash Screens

Creating it

As you develop your application you will find that your application takes an increasing amount of time to load. If this is the case, it is probably worth creating a splash screen. To create a splash screen you can either create it from scratch or use a VB template included in VB5 and VB6. Both methods will be covered here.

Method 1: Use a VB template

Select Projects | Add Form. Then select Splash screen from the list of items and click OK. All you need to do now is change some of the label captions. When the form is shown during run time, the code (which is already written) will automatically show the Application name, and versions. The only thing you need to set at design time is the company name and copyright information. To do this, simply select the Company label, and set the caption property to your company name. You can do the same for the copyright information. For more information on labels, click here. You can also change the image displayed in the Picture Box.

Method 2: Create the form from scratch

Select Projects | Add Form. Then select Form from the list of items and click OK. Then set the form properties to the following values

Property Value
Caption (Blank)
BorderStyle 3-Fixed Dialog
ControlBox False
MaxButton False
MinButton False

Now you need to add a view labels and a Picture box. As an example, you could use the following layout.

splshscr.gif (4705 bytes)

All items are labels, except the book, which is a Image control. To change the image, click the ... next to the Picture Property. You can also set the version label to automatically show the current version, so you do not have to change the label caption every time your product version changes. You can use the following code where lblVersion is the name of the Version label.

lblVersion.Caption = "Version " & App.Major & "." & _
        App.Minor & "." & App.Revision

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity.” - Dennis Ritchie