Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form's Keypress Cannot Reference Thisform.object.method
Message
From
18/10/1999 20:53:03
 
 
To
18/10/1999 20:46:28
Antonio Gubaira
Ingenieria Y Sistemas
Valencia, Venezuela
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00277952
Message ID:
00277956
Views:
25
>I am using a form´s Keypress method to monitor the use of function keys which in place must activate the Click method of some buttons, depending on the key pressed by the user. To achieve this I wrote the following case statement:
>
>

>LPARAMETERS nKeyCode, nShiftAltCtrl
>do case
> case nKeyCode=keyF2
> thisform.cmdToday.click
> case nKeyCode=keyF5
> thisform.cmdAdd.click
> case nKeyCode=keyF6
> thisform.cmdEdit.click
> case nKeyCode=keyF7
> thisform.cmdDelete.click
>endcase
>

>
>NOTE: keyF1 through keyF10 are predefined constants with the corresponding codes for the function keys.
>
>During runtime the form (with the buttons) is loaded, but when I press one of the designated Keys the following
>error message appears:
>
> THISFORM can only be used within a method
>
>What am I missing and how can I designate actions to keys pressed within an active form ?

Are you using ON KEY LABELS?
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform