|
-
December 17th, 1999, 04:18 PM
#1
time
how do i make it so that my form will pause for a small amount of time?
i have tried the code
Public Sub Time_Timeout(howlong)
current = Timer
Do While Timer - current < Val(howlong)
DoEvents
Loop
End Sub
but it keeps saying current is not defined. How would I define current to timer? Or, how would I make my form pause for a limited amount of tme?
-
December 17th, 1999, 04:43 PM
#2
Re: time
Try to add this API function to your code : sleep
sleep (number)
( "number" contain laps time you want to wait, in millisecondes)
-
December 17th, 1999, 09:58 PM
#3
Re: time
Ok try this
make 2 forms, make them identicle with a control array, make the first one with everything locked, and put a timer on it. put in for the code:
unload me
form2.show
under the timers code. then the other form will come up, but remember to unlock the second form. well i hope that works
PanasonicSubz
-
December 17th, 1999, 10:08 PM
#4
Re: time
I have to examples one is with timer second is with API which is more accurate:
Sub Wait(Seconds)
Current = Timer
Do While Timer - Current < Val(Seconds)
DoEvents
Loop
End Sub
and:
private Declare Sub Sleep Lib "kernel32" _
(byval dwMilliseconds as Long)
Sub Wait(Seconds as Single)
Dim lMilliSeconds as Long
lMilliSeconds = Seconds * 1000
Sleep lMilliSeconds
End Sub
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
|