0

hi i have 2 timers... and i want them to count just 1,2,3,4.... etc
now i have figured out how it works with date and time but not with ticks...
do you maby know a short way to do this?

Thijscream

3
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by Alpha-Bit
0

A tick is based upon the time interval.
For example you set the timer to poll every 1 second.

After 1 second elapsed,
tick
After 2 seconds,
tick

Is this what you are asking?

0

assuming you have a textbox named tbCount

inside the tick event, or a method you call from it

Create a variable named count, on each tick call:

int count = 0;

void timer_Tick(object sender, ElapsedEventArgs e)
{
count++;
this.tbCount.Text = count.ToString();
}
0

tanx this helped alot :)
finaly finished last thing on program if i figured out 1 more thing :P ;)

0

yeah figured that out...but how to display it in a textbox is my problem...

Could you please show it to us? Because People like me are searching up on google and they will find posts like these! Thank you!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.