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