|
-
Mar 16th, 2000, 12:27 AM
#1
Thread Starter
Hyperactive Member
Hi,
I'm sure you all know the Sleep API? I would like to make a sub Sleep and not the whole program! If you have seen the Sleep API before you will be aware that it puts the entire program to rest even restricting you from moving the form around the screen with the title bar until the sleep time is up. Is there a way to just sleep a sub (without using a loop)?
Thanks
-
Mar 16th, 2000, 04:06 AM
#2
Hyperactive Member
Simple. Don't use sleep. Either tell the code to stop executing and restart under certain circumstances, or:
Code:
While X <> 10
DoEvents
Loop
'Nothing happens till X = 10
-
Mar 16th, 2000, 05:38 AM
#3
Addicted Member
Have a look at a tip by James Wilson
"How to delay a VB program without using the API"
URL: http://www.vb-world.net/misc/tip82.html
Hope this helps
GRAHAM
-
Mar 16th, 2000, 05:47 AM
#4
transcendental analytic
Another way
if continue then goto cont
.
.
continue=true
exit sub
cont:
.
.
continue=false
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
|