Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not Necessary but would be nice
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00139787
Message ID:
00140457
Views:
34
Hi Ken,

>One caveat using this approch: It will not work for the operator keys (+,-,/,*,=). ALT key combinations on these keys are not valid.
>
>>Just to clarify for those who don't want to wade through the code... The command buttons in this sample are using shortcut keys \<1,\<2,\<3, etc. This is what the reference to the ALT key meant. In the textbox, I trap for a range of keys (0-9) and issue a keyboard('{ALT+' + chr(nKeyCode)+'}') to add the ALT key to the keypress, and thus activate the button. There's a few other issues, but this message was just to convey the general idea.

Run the following code and press ALT+A (like Add *s*):
Public oForm
oForm = Create("frmTest")
oForm.Show

Define Class frmTest as Form
   Add Object Command1 As Commandbutton With ;
      Height = 25, ;
      Width = 25, ;
      Caption = "  +   \<A"
Enddefine
Christof
--
Christof
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform