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
Printable View
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
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.
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:
When the function is done it will of course return to the form that you intended to start the user on.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
In the middle there you can use a progress bar while you open files, load graphics, open dbs, etc.
Hope that helps.
-John
Try something like this:
This will show a splash screen for 3 seconds.Code:Dim sngTimer As Single
frmSplash.Show
sngTimer = Timer
Do While Timer < sngTimer + 3
DoEvents
Loop
Unload frmSplash
frmMain.Show