Advertisement
koki2000

VB - Delay ( késleltetés )

Jan 10th, 2017
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Module Module1
  2.     Sub Delay(ByVal dblSecs As Double)
  3.         Const OneSec As Double = 1.0# / (1440.0# * 60.0#)
  4.         Dim dblWaitTil As Date
  5.         Now.AddSeconds(OneSec)
  6.         dblWaitTil = Now.AddSeconds(OneSec).AddSeconds(dblSecs)
  7.         Do Until Now > dblWaitTil
  8.             Application.DoEvents() ' Allow windows messages to be processed
  9.        Loop
  10.     End Sub
  11. End Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement