Colleagues:
Have any of you tried to "intercept" Ctrl+C, or Alt+F, or some other "reserved" key combinations (i.e. Ctrl+F) in the FORM.KeyPress procedure, provided FORM.KeyPreview = .T.?
I tried it - and could not make it work.
Here's how I tested it:
1. I made a blank form, set KeyPreview to True.
2. In the FORM.KeyPress procedure I entered single line of code:
3. Ran that form, pressed Ctrl+C - no wait window; Ctrl+F - same thing; Shift+<letter> - any letter works (invokes wait window).
For that matter, none of Alt+<letter> combinations works at all. Most likely, all Alt+<letter> are reserved for shortcuts. The problem is that I had to make the buttons in my toolbox (VFP's Command Group control) so small that only an icon fits in a button, no space for caption whatsoever. Therefore, I need to have my own procedures for Alt+<letter>.
Apparently, combinations like Ctrl+C, or Alt+<letter> are reserved for either OS or VFP itself.
Is there any way around?
AHWBGA
Regards,
Ilya
Have any of you tried to "intercept" Ctrl+C, or Alt+F, or some other "reserved" key combinations (i.e. Ctrl+F) in the FORM.KeyPress procedure, provided FORM.KeyPreview = .T.?
I tried it - and could not make it work.
Here's how I tested it:
1. I made a blank form, set KeyPreview to True.
2. In the FORM.KeyPress procedure I entered single line of code:
Code:
WAIT WINDOW NOWAIT [ nKeyCode = ] + ;
ALLTRIM(STR(nKeyCode, 3, 0)) + ;
[, nShiftAltCtrl = ] + ;
STR(nShiftAltCtrl, 1, 0)
For that matter, none of Alt+<letter> combinations works at all. Most likely, all Alt+<letter> are reserved for shortcuts. The problem is that I had to make the buttons in my toolbox (VFP's Command Group control) so small that only an icon fits in a button, no space for caption whatsoever. Therefore, I need to have my own procedures for Alt+<letter>.
Apparently, combinations like Ctrl+C, or Alt+<letter> are reserved for either OS or VFP itself.
Is there any way around?
AHWBGA
Regards,
Ilya