Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shortcut Key for Command Button
Message
From
08/02/2004 10:03:54
 
 
To
08/02/2004 09:41:25
Sabari Kreesh
Future Technologies
Mumbai, India
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00875253
Message ID:
00875256
Views:
18
>I've created set of command buttons for Confirm / Discard in a Form & I want to assign a short cut key F11 & F12 respectively, can any one help me

Hi Sabari;

The easiest way (I believe) is this following:
PROCEDURE thisform.actitivate
if  type("oForm")="U"
    Public oForm
    oForm = thisform
endif
ON KEY LABEL F11 oForm.mycommandbuttom1.click()
ON KEY LABEL F12 oForm.mycommandbuttom2.click()
ENDPROC
PROCEDURE thisform.deactivate
push key clear
* or
*ON KEY LABEL F11 *
*ON KEY LABEL F12 *
ENDPROC
HTH

Claudio
"Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, Ephesians 3:20
Previous
Reply
Map
View

Click here to load this message in the networking platform