Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to delay a timer for x seconds in vb.net 2005? 1

Status
Not open for further replies.

WomanPro

Programmer
Nov 1, 2012
180
0
0
GR
I would like to have a timer that will delay for 5 seconds between 2 subroutines in vb.net 2005. Is it possiple? And how? Which command of timer should I use? Any example please? Any help will be much appreciating. Thank you so much in advanced.
 
I'm unclear on what you want. Do you want a 5 second delay between the execution of 2 subroutines? If so you can use System.Threading.Thread.Sleep() to do that. Just pass the number of milliseconds you want the thread to stop execution, in this case 5000 (5 seconds):

System.Threading.Thread.Sleep(5000)

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Exactly that!!!! Thank you so much!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top