Click to See Complete Forum and Search --> : Timer


Garry
November 11th, 1999, 09:26 AM
I want to run my Vb application every half an hour. I cannot use the timer control as timer interval is in milliseconds and the maximum time you can give is some 65535 milliseconds which is little over a minute.

Can anybody tell me how to solve this problem?

Thanks!

Lothar Haensler
November 11th, 1999, 09:35 AM
use a timer, set the interval to 1 minute.
use a static variable in your timer event,
increment it by one upon each timer event.
if it is equal to 30, then 30 minutes have elapsed.
Do your processing and set your variable to zero again.

Chris Eastwood
November 11th, 1999, 09:44 AM
I Added an article on the CG site on Tuesday that shows how to create a new timer control that can accept intervals > 65535 - you just place it on your form and off you go :

http://codeguru.developer.com/vb/articles/1938.shtml


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb