Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trap CTRL-V in the keypress event?
Message
From
14/05/2001 08:32:09
 
 
To
14/05/2001 07:48:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00506749
Message ID:
00506762
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
Hi Tim,

I think you will find the problem is the edit menu. The key control for the edit:paste option is CTRL+V which is effectively defined as an ON KEY LABEL, the unfortunate problem with these is that they fire outside the standard event model, meaning the keypress event of the control is completely ignored.

Try turning off the system menu ( or just the edit menu ) and try the test again ( for nKeyCode = 22 and nShiftAltCtrl = 2 I think? ).

There is no easy solution I think. Function keys can be a pain.

You could try overriding CTRL+V in the GotFocus of the control and resetting in the LostFocus:
ON KEY LABEL CTRL+V _Screen.ActiveForm.ActiveControl.KeyPress(22,2)

I know this breaks about 100 rules on bad design, but it will work :)

Hope some of this helps.
- Craig

"If you're not prepared to be wrong, you will never come up with anything original."
- Sir Ken Robinson
Previous
Reply
Map
View

Click here to load this message in the networking platform