-
February 21st, 2007, 05:18 AM
#1
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?
A: - 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 :
Code:
Public Sub Main()
Dim fSplash As New frmSplash
fSplash.ShowDialog()
Application.Run(New YourMainFormName)
End Sub
- 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 :
Code:
Timer1.Enabled = False
Me.Close()
So that after the five seconds have expired, it will close this form. - 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|