VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This piece of code may be used to provide a time delay between two actions. The application waits f

by Abhi (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 25th September 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This piece of code may be used to provide a time delay between two actions. The application waits for as many milliseconds as you pass to the

API Declarations


' You'd need to change dblDuration inside the Sub to dwDuration.
' But hey, you should've figured that out by now ;)
' So the sub should look like:

Rate This piece of code may be used to provide a time delay between two actions. The application waits f



    Dim dblStart As Double, dblEnd As Double, dblNow As Double

    dblStart = Timer
    dblEnd = Timer + (dwDuration / 1000)

    Do
        dblNow = Timer
        DoEvents
    Loop Until dblNow < dblStart Or dblNow > dblEnd
End Sub

Download this snippet    Add to My Saved Code

This piece of code may be used to provide a time delay between two actions. The application waits f Comments

No comments have been posted about This piece of code may be used to provide a time delay between two actions. The application waits f. Why not be the first to post a comment about This piece of code may be used to provide a time delay between two actions. The application waits f.

Post your comment

Subject:
Message:
0/1000 characters