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. Visual Basic
  4. Timer object don't tick in a Module

Timer object don't tick in a Module

Scheduled Pinned Locked Moved Visual Basic
help
4 Posts 2 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.
  • N Offline
    N Offline
    Narenge
    wrote on last edited by
    #1

    Hi. I declare a Timer object in a Module and after disabling that, when i enable it again it doesn't tick. Please help me.

    L 1 Reply Last reply
    0
    • N Narenge

      Hi. I declare a Timer object in a Module and after disabling that, when i enable it again it doesn't tick. Please help me.

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

      Hi, IIRC some timers (there are multiple timer classes) get disposed off when you disable them. Please check the documentation. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      Sorry for any delays in replying, I currently don't get e-mail notifications.


      N 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, IIRC some timers (there are multiple timer classes) get disposed off when you disable them. Please check the documentation. :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        Sorry for any delays in replying, I currently don't get e-mail notifications.


        N Offline
        N Offline
        Narenge
        wrote on last edited by
        #3

        Tnx for your reply. I'm using System.Windows.Forms.Timer class and i was try Stop() and Start() method but my problem is existed likewise. Please tell me how i shold perform that.

        L 1 Reply Last reply
        0
        • N Narenge

          Tnx for your reply. I'm using System.Windows.Forms.Timer class and i was try Stop() and Start() method but my problem is existed likewise. Please tell me how i shold perform that.

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

          Hi, the Windows.Forms.Timer is my prefered timer. The MSDN documentation says it is single-threaded, which may mean you should do all its operations on the same thread (i.e. creation, Start, Stop, etc) as if it were a Control. Since it Ticks on the main or "GUI thread", my advice is to create and control it on that thread too (e.g. in a Form_Load handler, a Button_Click handler, etc.). BTW if this does not help, you may want to show the relevant code. :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          Sorry for any delays in replying, I currently don't get e-mail notifications.


          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