|
-
May 2nd, 2000, 09:11 PM
#1
Thread Starter
New Member
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
-
May 2nd, 2000, 09:20 PM
#2
Addicted Member
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
-
May 2nd, 2000, 09:24 PM
#3
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
-
May 2nd, 2000, 09:59 PM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|