|
-
Nov 17th, 2000, 05:21 AM
#1
Thread Starter
Addicted Member
This probably sound really stupid,
But how do you get a VB program to wait, to just loop/count for a bit without handling any external data?
Cheers 'n' beers
Skeen
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
-
Nov 17th, 2000, 05:23 AM
#2
Fanatic Member
Normally VB programs do wait for events to happen, unless you specifically set timers who trigger events.
Could you please be more specific?
If what you are referring to is just setting a wait timer, then you may try this:
Code:
Sub Pause(Interval As Integer)
Start = Timer
Do While Timer < Start + Interval
DoEvents
Loop
End Sub
[Edited by wildcat_2000 on 11-17-2000 at 05:25 AM]
-
Nov 17th, 2000, 05:24 AM
#3
Frenzied Member
Try the sleep api
Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Form_Load()
Sleep 5000 'sleep for 5 seconds
End Sub
'OR JUST LOOP
For x = 0 to 1000000
next x
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Nov 17th, 2000, 07:01 AM
#4
Thread Starter
Addicted Member
Cheers Guys
Amate of mine just told me about the sleep API and I reckon thats perfik for me - I'm waiting for a command line to execute before the program can continue - and its populating a table with around 5000 record so it takes afew seconds.
Cheers though
Skeen
"It wasn't the booze that made me snooze, It was the Gin that did me in!"
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
|