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
Printable View
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
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:
[Edited by wildcat_2000 on 11-17-2000 at 05:25 AM]Code:Sub Pause(Interval As Integer)
Start = Timer
Do While Timer < Start + Interval
DoEvents
Loop
End Sub
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
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