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
Printable View
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
This is API's Sleep Sub.
Don't mind the 1000, the 0's space, just put it back when you paste the code into your VB Project.Code:Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
'This will delay the program for 1 second:
Call Sleep(1000)
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
Or use timer
Post #514Code:'//Add a two forms, add a timer to Form1 (Interval 5000 ms = 5 sec)
Private Sub Timer1_Timer()
Form2.Show
Unload Form1
End Sub