Library tutorials & articles

Timer control

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

Comments

  1. 09 Jul 2006 at 08:34

    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

  2. 25 May 2005 at 08:36

    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

  3. 24 May 2002 at 02:46

    Sometimes, if the timer doesn't fire, one can try putting in a doevents statement. [Someone's got any experience with that one?]

  4. 01 Jan 1999 at 00:00

    This thread is for discussions of Timer control.

Leave a comment

Sign in or Join us (it's free).