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
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
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?
yeah figured that out...but how to display it in a textbox is my problem...
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();
}
tanx this helped alot :)
finaly finished last thing on program if i figured out 1 more thing :P ;)
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!
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.