Timers and reload/refresh

calmsoul

New member
Joined
Oct 29, 2007
Messages
2
Programming Experience
Beginner
Hello,

I am newbies in programming... I want to use timer to reload the form after every one hour...

How is this possible ? please explain with code example

I am using vb.net 2005

regards,
 
You would add a Timer to your form, set its Interval to 3600000 milliseconds, set its Enabled property to True and then handle its Tick event. The Tick event will then be raised every hour, so you can execute whatever code is appropriate in the Tick event handler.

As for "reloading" your form, we cannot help you because we have no idea what data you're displaying or how it's loaded in the first place. That said, I would suggest that you simply have one method that loads all the data. You can then call that when the form first loads and then again from the Timer's Tick event handler.
 
Back
Top