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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a timer on a form

Status
Not open for further replies.
Apr 10, 2000
155
US
I have tried using the timer class but do not think it is timing properly. What I wiant to accomplish is this:

1. Have a form with a command button named cmdStartTimer and a textbox named txtTime
2. Click the button and have the textbox display the time counting in seconds. 1, 2, 3, 4, etc. (When it gets to 60 show minutes and seconds)

Any help would be appreciated.

Thanks!
Rick
 
The timer controls are not known to be the most accurate thing ever.
What else is going on while you're counting the time? Other actions or events could be eating CPU time in the thread and causing the timer to pause or slow down.
 
Like RiverGuy I would ask you post your code. From just what you said I would ask the question "Why use a timer?" There is no point unless there is more going on.

-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top