Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Use key combo to call button.click()
Message
De
14/05/2003 09:10:28
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
 
 
À
13/05/2003 14:35:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00787445
Message ID:
00788143
Vues:
22
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
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform