Results 1 to 4 of 4

Thread: Timed Welcome

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2000
    Posts
    4

    Exclamation

    I noticed that when word or a similar application is starting up a small welcome screen appears for a few seconds and then dissapears. Is it possible for a similar screen to be done in visual basic, is so how can it be done?

    Thanks

  2. #2
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163
    Place a timer on your form and set the time to the number of milliseconds you want the form to be on the screen. When the timer expires unload the form in the timer event.

    PS Remember to disable the timer before you unload the form.
    Glenn D
    Development/Analyst

  3. #3
    Guest
    I've had the most success doing it this way:

    1. Set your app to start up to whatever your main screen is (like frmParent or whatever)
    2. From frmParent's load event call a function in your frmSplash (your "welcome" screen) like initWelcome
    3. initWelcome should do the following:
    Code:
           me.show                 'Shows itself
           me.refresh              'VERY IMPORTANT, makes sure it paints before running the rest of the sub
           'run a progress bar, initialize other routines, etc. here
           me.hide
    When the function is done it will of course return to the form that you intended to start the user on.
    In the middle there you can use a progress bar while you open files, load graphics, open dbs, etc.

    Hope that helps.
    -John


  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Lightbulb

    Try something like this:
    Code:
    Dim sngTimer As Single
    
    frmSplash.Show
    
    sngTimer = Timer
    
    Do While Timer < sngTimer + 3
        DoEvents
    Loop
    
    Unload frmSplash
    frmMain.Show
    This will show a splash screen for 3 seconds.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width