>Hi,
>
>I'm making a form with textboxes. I want to use the f10 fucntion to close the window and retrun control to an other form or my menu. I try to intercept the keypress in the keypress methode of my textbox. Strange but every keyhit i make passes via this keypress methode except the f10 keypress.
>
>So the code behind the f10 keypress doenst work. So the windows stand code afther te f10 keypress is activated and thats not what i want.
>
>So does anybody know how i can program my f10 key so he will do what i want ???
>
>Thnx
You can use ON KEY LABEL to make the F10 key do what you need.
ON KEY LABEL f10 _screen.ActiveForm.KeyPress(1,1) && whatever codes you want to pass here
Note that you may need to check that _SCREEN.ActiveForm is actually a form.
ON KEY LABEL f10 IIF(TYPE("_screen.ActiveForm")="O" AND PEMSTATUS(_SCREEN.ActiveForm,"KeyPress",5),_screen.ActiveForm.KeyPress(1,1),"No form")
or something along those lines.