How can I schedule a refresh to run every 5 minutes on my form without the user having to press a 'Refresh' button?
Printable View
How can I schedule a refresh to run every 5 minutes on my form without the user having to press a 'Refresh' button?
use API GetTickCount and a timer control :)
OR you can just use timer control and a variable that is incremented every time the timer does one minute (approx the max of how much a timer can do)
so every iteration of the timer control add 1 to a variable
and check if that =>5 then refresh and set the variable back to 0
if its less, add one and dont refresh
Use a timer control...
set the interval... 1000 per second
60000 for a minute...
(not sure if it will take a 300000 interval)
if not
with the 60000 interval...
use a simple x = x + 1 if x = 5 then etc...
should work fine
thanks
I should have known that, but I am not awake yet....
Beat by Kovan!
:)
in life, remember there is ALWAYS someone faster and better than you :)
learn to be beaten, BADLY
:)
keep up the good work