Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using a timer
Message
De
22/06/2016 14:40:00
 
 
À
22/06/2016 10:18:13
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01637566
Message ID:
01637588
Vues:
85
>Sorry the full code example is:
>
>
>Public goShutdownTimer
>goShutdownTimer = CreateObject("ctmrshutdown")
>Read Events
>
>Define Class ctmrshutdown as Timer
>   iRepeats = 10
>   Interval = 500
>   
>   Procedure Timer()
>      This.Enabled = .F.
>      ? "ran at",Datetime()
>      
>      This.iRepeats = This.iRepeats - 1
>      If This.iRepeats<0
>         Clear Events
>         Quit
>      EndIf
>      
>      This.Enabled = .T.
>   EndProc
>EndDefine
>
>
>Thanks
>LS

The timer you show is set to fire every half-second and to run 10 times (that's what the loop is about), then shut down. For what you're trying to do, you could just set the timer to go off after 30 minutes by setting Interval to 1800000 (30 * 60 * 1000 milliseconds). But I'm not sure I'd be comfortable doing that with a VFP timer. You might consider using the Windows scheduler instead.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform