Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count down timer ?
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00692538
Message ID:
00692690
Vues:
18
This message has been marked as the solution to the initial question of the thread.
Jim,

I wouldn't depend on the timer firing precisely at 1 second intervals as Hilmar suggests. I think you are better off doing something like:
thisform.tStart = datetime()
thisform.tEnd = thisform.tStart + nMinutes * 60
Then in the timer.Timer event:
lnSecondsRemaining = thisform.tEnd - datetime()
with thisform.txtLeft
   .Value = stuff( right( ttoc( {^2002-1-1 00:00:00} + lnSecondsRemaining, 1 ), 4 ), 3, 0, ':' )
   .Refresh()
endwith
>The timer part I understand. Making it display as 20:00 and then 19:59 and then 19:58 etc. is what I don't know how to do. If you do, a quick response will be greatly appreciated!
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform