Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Use key combo to call button.click()
Message
From
14/05/2003 09:10:28
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
 
 
To
13/05/2003 14:35:22
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00787445
Message ID:
00788143
Views:
24
Actually the KeyPreview = .t. in the form property sheet works the best. I can then trap for key strokes in the form's KeyPress event.

Antoher method I used was to define menu items in the menu designer with shortcuts to the form's button.click event. I tested for the form being active in the menu's procedure code as follows:

IF _screen.ActiveForm.name = [MYFORM]
_screen.ActiveForm.MyCommandButton.click()
ENDIF

I could then define any shortcut key stroke on the menu designer to call a button on my form.

Thanks,

Jerry



>Jerry,
>
>Please let us know what works...BTW, if you decide to stack two command buttons, you can create a class (based on a container) that has both buttons and all of the functionality built in.
>
>>I'll give this a try.
>>
>>Thanks,
>>
>>Jerry
>>
Previous
Reply
Map
View

Click here to load this message in the networking platform