I have this form in VFP5 that has a custom METHOD called showkeyx.
In the INIT of the form I have this code
ON KEY LABEL F2 THISFORM.showkeyx
What I need to do is call this custom method when the F2 key is pressed.
But when I run the form, I get an error at the INIT for the code line
ON KEY LABEL...
The only way I can get this ON KEY to work is by creating a PRG file called showmykey with the line:
FORMNAME.showkeyx
and in the init of the form:
ON KEY LABEL F2 DO showmykey
This works and the custom method is called.
But I want to be able to call the custom method of the form, from the form itself with an ON KEY LABEL ... WITHOUT the external PRG file.
Is this possible and how can I do this????
Bernard