Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Visual Basic
Expertise: Beginner
Oct 1, 1996

Creating a Splash Screen

Question:
I also want to know how to create a title screen, then give it a delay to wait load the program...sort of how windows loads (first you see the Windows screen..then it goes away and windows loads).

Answer:
Here's what you need to do:

  1. Create a form with a Timer control and an Image control that fills the form.
  2. To make the form look correct as a "splash screen", do the following to the form:
    • Set the Align property of the image control to Top or Bottom, and drag the control so it fills up the form.
    • Set the border style to Fixed Single
    • Delete the caption.
    • Set the ControlBox, Minimize, and Maximize properties to False
  3. Set the Delay property of the Timer to the number of milliseconds (1000 milliseconds per second) you want the delay to be for. Do that in the Properties window for the Timer.
  4. As far as code, in the Timer_Timer event, put in the following lines of code
            Timer.Delay = 0         ' This disables the timer that was running
            Unload Me
            NewForm.Show            ' NewForm is the next window that should be
                                    ' loaded for the application.  
    
  5. If you want to allow the user to click on the splash screen to make it go away, put the same code into the Image_Click event. That's always a nice feature to add so that experienced users don't have to wait for the screen to go away.
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date