M
Mr. B
My current app has a timer that I kick ON in my Form1_Load as follows:
' Set Up the Timer Function
Dim t As New System.Timers.Timer(12000) ' 1000 = 1 Second
t.Enabled = True ' False to Turn OFF
AddHandler t.Elapsed, AddressOf TimerFired
This in turns fires up my sub called "TimerFired" every 2 minutes...
In this sub, I check a file for a change in the date/time and if I find a
difference (ie newer file date), I then continue on with the sub and does some
updating. Otherwise I end the sub and the timer continues on with it's
periodical check.
What I want to do is to "Stop" the Timer event 'when' the sub does it's
updating... then fire it back up when the 'stuff' finishes.
I've tried a few things such as:
Timer1.Enabled = False
in my Sub... but that doesn't work...
Any ideas out there?
Regards,
Bruce
' Set Up the Timer Function
Dim t As New System.Timers.Timer(12000) ' 1000 = 1 Second
t.Enabled = True ' False to Turn OFF
AddHandler t.Elapsed, AddressOf TimerFired
This in turns fires up my sub called "TimerFired" every 2 minutes...
In this sub, I check a file for a change in the date/time and if I find a
difference (ie newer file date), I then continue on with the sub and does some
updating. Otherwise I end the sub and the timer continues on with it's
periodical check.
What I want to do is to "Stop" the Timer event 'when' the sub does it's
updating... then fire it back up when the 'stuff' finishes.
I've tried a few things such as:
Timer1.Enabled = False
in my Sub... but that doesn't work...
Any ideas out there?
Regards,
Bruce