Robert Schwer

Robert Schwer

  • NA
  • 19
  • 2.1k

Change Interval time of System.Windows.Forms.Timer

Sep 22 2020 3:49 AM

Hello,

 is it possible to change the Timer.Interval time after start of the timer.

 I do this al follows:
int iTimerNewIntervalTime = 400; 
Timer.Stop();
Timer.Interval =  iTimerNewIntervalTime;
Timer.Start();
 
It would be wrong to say nothig happens.
It is so that the timer no longer triggers a tick event.
 
Can someone tell me why that is.
And how can I change the time during the runtime?
 
Thanks a lot. 
 
 
 

Answers (5)