Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MOD is not correct
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01622479
Message ID:
01622481
Vues:
68
>Hi Gang!
>
>Quick question....
>
>I have the code below....
>
>LOCAL llFileExists,lnCount
>llFileExists = .F.
>ltStart  = DATETIME()
>llExitLoop2 = .F.
>
>
>DO WHILE ((DATETIME() - ltStart) < 300) AND NOT llExitLoop2
>    IF MOD((DATETIME() - ltStart),1) = 0
>            WAIT "Waiting for file - " + UPPER(ALLTRIM(lcFileName)) + " - " + ;
>            STR( 300 - (DATETIME() - ltStart)  ,3,0) + " seconds remaining." WINDOW NOWAIT noclear
>      ENDIF
>            
>    IF FILE(ALLTRIM(lcFileName))
>        llFileExists = .T.
>        WAIT CLEAR
>        EXIT
>    ENDIF
>    DOEVENTS
>ENDDO
>
>and I want the WAIT WINDOW to NOT flicker !!!  But it does.   That is why I added the check for the MOD, so that the WAIT WINDOW would only be updated every 1 second....but it appears that the MOD is wrong and is true for more than each second.
>
>So, is my MOD wrong?  IF so, than what should I do to make it only update the WAIT WINDOW each second?
>
>Thanks!
>
Use seconds() function instead and check it in the loop against the pre-saved value before the loop.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform