|
-
Aug 8th, 2000, 12:40 PM
#1
Thread Starter
New Member
Hi, Just an elementary problem.
How do you add a delay to a splash screen to allow it to be displayed for a sufficient time.
Cheers
-
Aug 8th, 2000, 12:51 PM
#2
This is API's Sleep Sub.
Code:
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'This will delay the program for 1 second:
Call Sleep(1000)
Don't mind the 1000, the 0's space, just put it back when you paste the code into your VB Project.
-
Aug 8th, 2000, 12:51 PM
#3
Fanatic Member
I'm just new at VB5 and I did it with this:
Private Sub Timer1_Timer()
Static Progress As Integer
Progress = (Progress + 1) Mod 10
ProgressBar1.value = Progress
If ProgressBar1.value = 9 Then
frmMain.Show 'count finished
Unload Me
End If
End Sub
I had the Timer Interval set to 100
Hope this helps, there is no doubt an easier way to do it but I'm just new at it.
Spud
-
Aug 8th, 2000, 12:52 PM
#4
Fanatic Member
Or use timer
Code:
'//Add a two forms, add a timer to Form1 (Interval 5000 ms = 5 sec)
Private Sub Timer1_Timer()
Form2.Show
Unload Form1
End Sub
Post #514
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
|