February 21st, 2007, 04:18 AM
VB.NET 2003 Forms : How do I make a Splash Screen?
Q: What is a Splash Screen?
A: A "splash" screen (title screen) can be used by an application to display important information about a program. The splash screen can also be used as an activity indicator during application startup.
Q: How do I make a Splash Screen?
- Add a new Windows Form, and give it an appropriate name (such as frmSplash)
- Add a Module to your application, also, name it appropriately
- Inside the Module, create a Sub Main :
Public Sub Main()
Dim fSplash As New frmSplash
- Add a Timer Control to the Splash Screen form (frmSplash). Set the Interval property to 5000 (for 5 seconds, for example) and set the Enabled property to True (if necessary).
- In the Timer_Tick event, type the following :
So that after the five seconds have expired, it will close this form.
Timer1.Enabled = False
- Also add the following to the frmSplash_Click event :
- Set the Project's Startup Object to Sub Main (Project, Properties)
Q: How do I make the Splash Screen form look like a Real Splash screen?
A: Set the following properties (in the properties window) on your splash screen form :
[list][*]ShowInTaskbar = False[*]FormBorderStyle = None[*]StartPosition = centerScreen
For further customisation, you can add controls such as Labels, and Pictures, to enhance your Splash Form's appearance
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!