B
Bob Quintal
=?Utf-8?B?RGFuaWVsV2FsdGVyczY=?=
the sleep statement. That is supposed to let the system update
the screen.
txtTime.Caption = 5
DoEvents
Sleep 1000
Insert a DoEvents statement between each change of caption andHi I have a simple splash screen that I would like to display
at the start of my project.
Attached to the form_open routine is the following code
Code:Option Compare Database Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 'http://www.rohitab.com/discuss/lofiversion/index.php/t6093.ht m l Private Sub Form_Open(Cancel As Integer) Form.Visible = True TxtTime.Caption = 5 Sleep 1000 TxtTime.Caption = 4 Sleep 1000 TxtTime.Caption = 3 Sleep 1000 TxtTime.Caption = 2 Sleep 1000 TxtTime.Caption = 1 End Sub
What this does is count down five seconds. Each second it
should update the value of a label within the form, to show
the user how many seconds that they have left until the
project opens.
However, the form wait for the 5 seconds, is then displayed
with "1" as the label caption.
So it's processing the code OK, but not displaying the form
whilst it's happening!
I've tried to make the form visible from the start by
form.visible=true, but this has had no effect whatsoever...
Is there a way to turn ECHO on or something along those lines?
TIA for any help
Dan Walters
the sleep statement. That is supposed to let the system update
the screen.
txtTime.Caption = 5
DoEvents
Sleep 1000