Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding ON KEY LABEL
Message
De
27/07/2004 00:01:52
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00927965
Message ID:
00928176
Vues:
35
>May be You shoul save the current assosiation , run the code & restore it.
>
> old_assosiation = ON("KEY","PGDN")
> ON KEY LABEL PgDn
> .... && Your code here
> ON KEY LABEL PgDn &old_assosiation
>
This wasn't fast enough in DOS/FPD2.6 days... I've had users who were able to sneak another keypress between the first two lines. Maybe today's machines are fast enough to prevent that, but there's always a risk that the machine may be slowed down for whichever reason.

Besides, this still keeps Fox listening to other keys, so an OKL on PgUp may fire while it's still working on the code for PgDown.

For a while I used to think that OKL's were a great idea, and I still use them instead of keyboard macros, when I'm doing a repetitive thing on manually selected records and other similar situations - but only in the command window. Not in the application.

Form.keypress:

... case nKeyCode=-1 && F2

etc etc.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform