Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Timer
Message
General information
Forum:
Visual Basic
Category:
Other
Title:
Re: Timer
Miscellaneous
Thread ID:
01063449
Message ID:
01063481
Views:
10
For example:
Private Sub Timer1_Timer()
Static sCount As Integer

    sCount = sCount + 1
    Label1.Caption = sCount
    If sCount >= 20 Then
        'Do what you have to do
        sCount = 0
    End If
End Sub
>You probably found that the maximum value of the Interval property of the Timer is about 65000 milliseconds (about a minute).
>
>If you want something to run every 20 minutes, set the Timer to 60000 and count the number of time the timer event is raised (using a static variable). When it hits 20, do your job and reset the counter to 0.
>
>
>>Hello every one,
>>
>>Please anybody tell me how I set timer to execute one function after every 20 minutes or what ever I set time for this timer.
>>
>>Thankx
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform