Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Timer Control Not working in proper Interval + Sourabh Das

Timer Control Not working in proper Interval + Sourabh Das

Scheduled Pinned Locked Moved C#
designhelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dot Net Jantu
    wrote on last edited by
    #1

    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,

    0 1 Reply Last reply
    0
    • D Dot Net Jantu

      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,

      0 Offline
      0 Offline
      0x3c0
      wrote on last edited by
      #2

      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

      D L 2 Replies Last reply
      0
      • 0 0x3c0

        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

        D Offline
        D Offline
        Dot Net Jantu
        wrote on last edited by
        #3

        Thanks for that hint.. solved. problem solved... 1 Sec = 1000 1 hour = 3600000

        Thanks and Regards,

        1 Reply Last reply
        0
        • 0 0x3c0

          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

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          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


          0 1 Reply Last reply
          0
          • L Luc Pattyn

            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


            0 Offline
            0 Offline
            0x3c0
            wrote on last edited by
            #5

            :doh: That'll teach me to skim read MSDN. Fixed.

            OSDev :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups