|
-
Apr 22nd, 2000, 03:37 AM
#1
Here is a simple way to make your program wait during an action.
First add a timer to your form. Call it Timer1. Sey its interval to 0 and its enabled property to FALSE.
Then add this subroutine.
------------------------------------------------------------
Public Sub Wait(seconds)
'-- Turn Timer On
Timer1.Enabled = True
'-- Set Timer Interval
Me.Timer1.Interval = 1000 * seconds
While Me.Timer1.Interval > 0
Do Events
Wend
'-- Turn Timer Off
Timer1.Enabled = False
End Sub
------------------------------------------------------------
Now when you want to use it just put in a line like this in a buttons Click() action.
Wait (5) '-- To Wait 5 seconds
If it doesnt work, check for spelling, i might have spelled something wrong. Hope it helps someone...
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
|