code_junkie

How do I delay code execution in Visual Basic (VB6)?

Nov 11th, 2011
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Call ExternalLongRunningProcess
  2. Call DoOtherStuff
  3.  
  4. Do
  5. If isSomeCheckCondition() Then Exit Do
  6. DoEvents
  7. Loop
  8.  
  9. Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
  10.  
  11. Sleep 10000
  12.  
  13. Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
  14.  
  15. While IsStillWaitingForSomething()
  16. DoEvents
  17. DoEvents
  18. Sleep(55)
  19. Wend
Add Comment
Please, Sign In to add comment