Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I use the SYS() command?
Message
 
À
05/01/2000 19:53:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00313622
Message ID:
00313791
Vues:
44
Mike,

The problem is not with the SYS(1270) command, but rather when and where you check it. It is much easier and less prone to problems to use the Cancel property of the command button and then chekc for the Escape key having been pressed.

IOW, if the situation is bypassing teh valid test of a contrl if Cancel was clicked then simply maknig the Cancel property for that button .T. and doing this at the start of teh Valid is fine;
* Valid
IF LastKey() = 27
   RETURN && valid is passed
ENDIF
* Other valid code here
If it is allowing a process to be interrupted by the cancel button then you need to process events at regular intervals during the process.
* Some lengthy process
LOCAL lnCntr
lnCntr = 1
DO WHILE ...
   Blah
   Blah
   Blah
   lnCntr = lnCntr + 1
   IF MOD(lnCntr,100) = 0
      DoEvents
      IF LastKey() = 27
         Exit
      ENDIF
   ENDIF
ENDDO
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform