VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A Super Easy Delay Timer

by Patrick K. Bigley (14 Submissions)
Category: Math/Dates
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (10 Votes)

A delay timer so easy, this paragraph is longer. I had to submit this easy code because it is not on this website. Uses no API, and it is very handy!!

Assumes
Make a form with a command button ont it. Paste the code into the command button. This sample has a 3 second delay, then you hear a beep.

Rate A Super Easy Delay Timer

Private Sub Command1_Click()
 Dim Start As Long
 Start = Timer
  
  Do While Timer < Start + 3 'a 3 second delay (Change to any numer you want)
   DoEvents  ' Yield to other processes.
  Loop
  
 Beep
 
End Sub

Download this snippet    Add to My Saved Code

A Super Easy Delay Timer Comments

No comments have been posted about A Super Easy Delay Timer. Why not be the first to post a comment about A Super Easy Delay Timer.

Post your comment

Subject:
Message:
0/1000 characters