Library tutorials & articles
Timer control
By James Crowley, published on 14 Jul 2001
Page 1 of 3
- Introduction
- Properties
- Examples
Introduction
The timer control allows a certain procedure to be called at an interval (ie every 1 minute). The timer control is not completely accurate, and if the computer is busy, the procedure will not be called, but it is still a good way, for example, to update a display every minute.
Double click on the Timer icon when you have added it to your form. A code window will appear with a new procedure called Timer1_Timer(). This procedure is called each time the specified interval elapses:
Private Sub Timer1_Timer()
'// this procedure is called
End Sub
Related articles
Related discussion
-
ditto
by zapthedingbat (2 replies)
-
Mousewheel
by jonh (3 replies)
-
True multithread VB source code controls
by James Crowley (3 replies)
-
Rely
by Yujvendra Verma (4 replies)
-
True multithread VB source code controls
by James Crowley (3 replies)
Hi!
I created a control that I named KYNOUAJAXContainer that can be found at http://www.kynou.com/KYNOUControls/KYNOUControls.zip. This control allows you to add regular ASP.NET controls into it and they all become AJAX enabled. You can use this container control as a sort of timer control for ASP.NET. This is because the container control has a property called ShouldRefresh. When this property is set to true, it will refresh the content of all the controls inside of the container every RefreshInterval seconds (RefreshInterval is another property of the container control).
I posted tutorials that will walk you through the steps to use the control at http://www.KYNOU.com under the Tutorial Index => Ajax => KYNOU AJAX Controls link
How could i make a timer activate every 3 hours to check the database and findout any new records were added?
Thanks in advance
E.Screw
Sometimes, if the timer doesn't fire, one can try putting in a doevents statement. [Someone's got any experience with that one?]