Timer Control Not working in proper Interval + Sourabh Das
-
Hi Guys, I have dragged and droped a timer control "tmrGetMappingXML" from the Common Controls Tab in Tool Box. The issue that I am mentioning also appears for the Timer Control present in the Components Tab in tool box. In the form Load i have written: tmrGetMappingXML.Interval = 3600; //1 Hour = 3600 Seconds tmrGetMappingXML.Enabled = True; tmrGetMappingXML.Start(); The timer interval is also set in the design time to 3600 seconds. But the Tick event of the timer fires continuously every second. Fed up. Please suggest. Regards, Sourabh
Thanks and Regards,
-
Hi Guys, I have dragged and droped a timer control "tmrGetMappingXML" from the Common Controls Tab in Tool Box. The issue that I am mentioning also appears for the Timer Control present in the Components Tab in tool box. In the form Load i have written: tmrGetMappingXML.Interval = 3600; //1 Hour = 3600 Seconds tmrGetMappingXML.Enabled = True; tmrGetMappingXML.Start(); The timer interval is also set in the design time to 3600 seconds. But the Tick event of the timer fires continuously every second. Fed up. Please suggest. Regards, Sourabh
Thanks and Regards,
-
Dot Net Jantu wrote:
tmrGetMappingXML.Interval = 3600; //1 Hour = 3600 Seconds
The Interval property is given in milliseconds. You need to multiply your number by 1,000
OSDev :)
modified on Friday, November 13, 2009 8:39 AM
Thanks for that hint.. solved. problem solved... 1 Sec = 1000 1 hour = 3600000
Thanks and Regards,
-
Dot Net Jantu wrote:
tmrGetMappingXML.Interval = 3600; //1 Hour = 3600 Seconds
The Interval property is given in milliseconds. You need to multiply your number by 1,000
OSDev :)
modified on Friday, November 13, 2009 8:39 AM
0x3c0 wrote:
The Interval property is given in ticks (milliseconds)
In Windows a tick is a tenth of a microsecond. :)
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
-
0x3c0 wrote:
The Interval property is given in ticks (milliseconds)
In Windows a tick is a tenth of a microsecond. :)
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages