Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Give user to control/quit a looping process
Message
 
 
À
18/02/1999 17:44:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00189066
Message ID:
00189156
Vues:
12
Mesa,

You can use inkey():
llInterrupt = .f.
scan
   llInterrupt = ( inkey() = 27 )
   if ( llInterrupt )
      exit
   endif
endscan
This will let the user hit Escape if SET ESCAPE is OFF. You can use any other key if you want. The help topic for inkey() shows the numeric codes.

>I was intended to design a Record Finder that behave like
>"Find File" in Windows '95 or later
>
>I've tried to make a looping finder like this :
>SCAN FOR ......=......
>
>ENDS
>
>but when the code is executed I can quit this Loop until it's done.
>
>then I tried with looping like this :
>LOCATE FOR .....=.....
>
>then in a Timer object I put a command to execute a method in my Forms
>that doing SKIP and display my result in a Listview object
>
>but still it doesn't work the way that I wanted to,..
>it can quit the looping soon
>
>the reasons I designed this kind of Finder is 'cause the number of records
>in my table is large it's contain more than 15000 records
>So is there any idea to solve this,...?
df (was a 10 time MVP)

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

Click here to load this message in the networking platform