|
-
Aug 18th, 2000, 07:33 PM
#1
Thread Starter
Fanatic Member
Hi all and sundry.
I have some processing that needs to take place in my proggy before the initial form is displayed. As time goes by (and the program is used), this processing time is going to increase.
How can I make the splash screen stay visible while the processing is going on and then go away when the initial form is ready (i.e., the processing is complete)? Is this even possible? Or do I just have to pick some time that I want the splash screen to be visible and hope that it's long enough?
Thanks for any suggestions.
-
Aug 18th, 2000, 07:37 PM
#2
Addicted Member
ummm I haven't needed to do this for a while but I think in my splash screens form load event I had something like:
Code:
Me.Show 'if I recall right my splash screen wasn't showing until the form I wanted to load had loaded, and this fixed that problem.
Load Form1 'Loads the form to memory, so all code in its form load event will be executed
Me.Hide
Form1.Show
hope that helps.
-
Aug 18th, 2000, 07:38 PM
#3
Make the splash screen the very first form to startup and then put this code:
Code:
Private Declare Sub Sleep Lib "kernel32" _
(ByVal dwMilliseconds As Long)
Private Sub Form_Load()
Load form1 'starts the events in Form_Load on form1
Sleep 3000 '3 second time out
Form1.Show 'Show form1
Unload Me 'Unload Splash Screen
End Sub
-
Aug 18th, 2000, 09:31 PM
#4
Thread Starter
Fanatic Member
Thanks...
for the replies. I hope that Crypt's example works because it may be necessary for the splash screen to be visible for more than 3 seconds as shown in Matthew's code for the reasons stated in my initial post.
I don't want to specify a specific time for the program to "sleep." I just want the splash screen to go away once my primary form has finished loading.
Thanks.
-
Aug 18th, 2000, 09:57 PM
#5
The only reason why it's good to pause it for a few seconds is because if you use Crypt's code, it will show the splash screen so fast and then hide it really quick so you probably won't even get to really see it. Say you have a introduction picture of art for the splash screen, you want the user to be able to see it. So it's good to pause it for a second or three.
-
Aug 18th, 2000, 10:08 PM
#6
Addicted Member
yeah a pause is probably good if your form you want to load code only takes 2 seconds or so to execute its form load event, but with mine my form executed alot of code in it form load event, and took a bit of time, so there was no need for a pause in my case.
-
Aug 18th, 2000, 10:45 PM
#7
Thread Starter
Fanatic Member
...
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
|