Sudhir,
The message means that commands like this and thisform can only be used from methods of objects and not from outside functions. Though, _screen.Activeform.PageFrame1.Page1.MyMethod() would work.
BTW, Rather than using OKL a better approach for trapping keys in forms is to use the KeyPress() event of the form and set the Form's KeyPreview property to .T.
>How can on key label command be used in forms ? When I write following commands in Load event of the form :
>on key label Ctrl+A thisform.pageframe1.page1.command1.click() ;
>an error message "Thisform can only be used within a method" appears.