timer-showing

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,
I want to show timer in somewhere(e.g in a textbox) like chronometer.
Thanks...
 
Syd,

You basically need to set a timer object up with an interval for how
fast you want your chronometer to act. For example, if you want your
chronometer to change every second, you set the timer to fire every second.

When you start your chronometer, you take note of the current time.
When the timer fires, you can subtract the starting time from the current
time and that is the value you place in the textbox.

Hope this helps.
 
When I press button the chronometer will start and it will be shown in
textbox.How??

So what have you tried so far? You're surely not expecting someone in here
to write your code for you, are you...???
 
Thanks.It was helpful.I took min and sec seperately and it is done...

Nicholas Paldino said:
Syd,

You basically need to set a timer object up with an interval for how
fast you want your chronometer to act. For example, if you want your
chronometer to change every second, you set the timer to fire every second.

When you start your chronometer, you take note of the current time.
When the timer fires, you can subtract the starting time from the current
time and that is the value you place in the textbox.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Syd said:
Hi All,
I want to show timer in somewhere(e.g in a textbox) like chronometer.
Thanks...
 
Back
Top