Search This Blog

Monday, May 16, 2011

How to Implement a wait() in VB6

Here is how I created a Wait() for VB6.
Needed for a project to allow form code to pause while still allowing a 3rd party control to upload a file to a server.

Public Sub Wait(milliseconds As Integer)
Dim dTimer As Double
dTimer = Timer
Do While Timer dTimer + CDbl(milliseconds / 1000)
DoEvents
Loop
End Sub

No comments: