Google Answers Logo
View Question
 
Q: How do I reset a timer? ( No Answer,   2 Comments )
Question  
Subject: How do I reset a timer?
Category: Computers > Programming
Asked by: jstm-ga
List Price: $5.00
Posted: 06 Mar 2005 23:25 PST
Expires: 06 Apr 2005 00:25 PDT
Question ID: 485991
I would like to reset timer4 each time I click a button?
Answer  
There is no answer at this time.

Comments  
Subject: Re: How do I reset a timer?
From: frde-ga on 07 Mar 2005 02:04 PST
 
If this is VB4/5/6

Then one method is :

Timer4.Enabled = False
Timer4.Enabled = True

One is generally better off having a shorter interval, and checking
whether a target DateTime has been passed, rather than having one huge
wait.
It is a bit more obvious and flexible
- also Timers are not terribly accurate
- particularly if you do a lot of work when they fire
Subject: Re: How do I reset a timer?
From: inmar2002-ga on 11 Mar 2005 02:05 PST
 
If you want to reset time afte 10 second
U can start timer 
   dim i as integer
  In forms_load() event
   i=1
   timer1.interval=500
   timer1.start()
  
  
In timer_tick event
   i = i+1
   if i=10 then
      timer1.interval=500
      i=0
   end if

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy