winforms - C# timer stop after some number of ticks automatically -
how stop timer after numbers of ticks or after, let's say, 3-4 seconds?
so start timer , want after 10 ticks or after 2-3 seconds stop automatically.
thanks!
you can keep counter like
int counter = 0;
then in every tick increment it. after limit can stop timer then. in tick event
counter++; if(counter ==10) //or whatever limit yourtimer.stop();
Comments
Post a Comment