Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
On Key Label and Form Keypress Event
Message
From
22/01/2004 21:10:18
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00869709
Message ID:
00869727
Views:
17
No such luck. Still does not even enter the form's keypress. I must be ovrlooking something....
However, the below does work:
PUSH KEY CLEAR

ON KEY LABEL f1 DO ("userhelp") WITH PROGRAM()
ON KEY LABEL F5 DO chgpass
ON KEY LABEL F6 DO coverltr
ON KEY LABEL F8 DO doprpfcinoscrn
ON KEY LABEL F9 DO doothpfcnoscrn
ON KEY LABEL ALT+F5 DO aprshow
ON KEY LABEL ALT+F6 DO dpshow

DO FORM ag_scrn NAME oag_scrn LINKED
IF TYPE('oag_scrn') = "O" .and. !ISNULL(oag_scrn)
	oag_scrn.release()
ENDIF
RELEASE oag_scrn

POP KEY
I'd rather handle it all in the form's keypress, but as long as this works, I will live with it.

>Sorry, I didn't notice that you want to clear keys not disable them. According to help and my tests PUSH/POP KEY has no effect on keys set with SET FUNC. Can you change them to ON KEY LABEL?
>The Keypress event doesn't fire if ALT key is pressed. Try
ON KEY LABEL ALT+S CHR(251)
>ON KEY LABEL ALT+F5 CHR(252)
>ON KEY LABEL ALT+F6 CHR(253)
and check in Keypress for those codes.
>
>>Thanks Sergey, but what then happens is that when the below keys are pressed the keypress event does not even run. However, pressing F7 works and it is not specifically set to anything below. I also tried using PUSH KEY CLEAR without setting them to anything afterwards in the prg like below (they are still trapped for in the keypress) but they still send CHR(13).
>>
>>>Tracy,
>>>
>>>I use '*' to disable keys.
PUSH KEY CLEAR
>>>ON KEY LABEL F4 *
>>>ON KEY LABEL F5 *
>>>ON KEY LABEL F6 *
>>>ON KEY LABEL F8 *
>>>ON KEY LABEL F9 *
>>>ON KEY LABEL ALT+S *
>>>ON KEY LABEL ALT+F5 *
>>>ON KEY LABEL ALT+F6 *
>>>...
>>>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform