Timer stop working???
-
Hi, I put a timer control in a form. I start it (tm.enabled=true) at the contstructor. It works well. but later on, I use the code like this: tm.Interval=2000; //(different value) tm.Start(); But the timer stop ticking??? Why??? I have to change the interval dynamically. please help me!! Thanks!!! Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!
-
Hi, I put a timer control in a form. I start it (tm.enabled=true) at the contstructor. It works well. but later on, I use the code like this: tm.Interval=2000; //(different value) tm.Start(); But the timer stop ticking??? Why??? I have to change the interval dynamically. please help me!! Thanks!!! Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!
Just a guess, but you may have to stop the timer before changing its interval.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: How 'bout a little guitar now? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
Just a guess, but you may have to stop the timer before changing its interval.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: How 'bout a little guitar now? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
thx, I solve the problem by using System.Timers.Timer instead of System.Windows.form.Timer. I have no time to find out what is the difference between them . but I think it should not happen. thx again!! Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!
-
thx, I solve the problem by using System.Timers.Timer instead of System.Windows.form.Timer. I have no time to find out what is the difference between them . but I think it should not happen. thx again!! Alan Shen MCAD for .NET Version ^~^~^~^~^~^~^~^~^~^~^ Great idea is the beginging of success!
http://msdn.microsoft.com/msdnmag/issues/04/02/TimersinNET/[^] ............................. There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life. Fiat justitia, et ruat cælum