Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Avoiding ON KEY LABEL
Message
From
27/07/2004 00:01:52
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00927965
Message ID:
00928176
Views:
36
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform