Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page frame hot keys
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00309001
Message ID:
00315318
Views:
42
>>Because the PageFrame does not have a keypress event, how about using the keypreview of the form to check for Alt+I and Alt+R in the Keypress event and then programmatically activate the appropriate page on the pageframe.
>>
>>HTH.
>>
>Michael,
>
>That could be a great idea, except that the KeyPress does not trap Alt key combos. Yeah, I know the parameters idicate it will but help says, "The KeyPress event does not occur for any combination of keys with the ALT key"

Jim,

When I put the following code in the KeyPress event of the form, the Alt-F2 and Alt-r keys were recognized, but the Ctrl combinations were not.

LPARAMETERS nKeyCode, nShiftAltCtrl

DO CASE
* First chech for variations of F2 (Shift-F2 will not work)
CASE nKeyCode = -1
DO CASE
CASE nShiftAltCtrl = 1
MessageBox ("Shift-F2 with -1")
CASE nShiftAltCtrl = 2
MessageBox ("Ctrl-F2 with -1")
CASE nShiftAltCtrl = 4
MessageBox ("Alt-F2 with -1")
OTHERWISE
MessageBox ("F2 with -1")
ENDCASE
CASE nKeyCode = 85
MessageBox ("Shift-F2")
CASE nKeyCode = 95
MessageBox ("Ctrl-F2")
CASE nKeyCode = 105
MessageBox ("Alt-F2")

* First chech for variations of 'r'
CASE nKeyCode = 114
DO CASE
CASE nShiftAltCtrl = 1
MessageBox ("Shift-r with 114")
CASE nShiftAltCtrl = 2
MessageBox ("Ctrl-r with 114")
CASE nShiftAltCtrl = 4
MessageBox ("Alt-r with 114")
OTHERWISE
MessageBox ("r with 114")
ENDCASE
CASE nKeyCode = 82
MessageBox ("Shift-r")
CASE nKeyCode = 18
MessageBox ("Ctrl-r")
CASE nKeyCode = 19
MessageBox ("Alt-r")

OTHERWISE
MessageBox ("Not the F2 Key")
ENDCASE
Michael P. Antonovich, MCSD
Email: mike@micmin.com
MicMin Associates - Orlando, FL


Previous
Next
Reply
Map
View

Click here to load this message in the networking platform