>First thanks to you and George for hints.
>
>I also tried PostMessage() API and keybd_event API but with no luck.
>keybd_event worked for letters but can't send LEFT, UP, HOME DEL, etc. to another VFP application and PostMessage() didn't work at all (in any application).
>
PostMessage() works fine for me, but it's dependent onhaving the proper hWnd to address the other app. Perhaps a better solution going VFP to VFP is to establish the recipient app as a COM server, and submit keystrokes to the COM server, to be translated into KEYBOARD commands in the server app - obviously, it needs to be an out of process server to stay an .EXE, and to allow the use of UI elements in the COM application.
>P.S. I can do it by modifying the application where I try to send keys but I'd rather like to do general-purpose touchscreen keyboard with wscript.shell or postmessage or keybd_event.
I'd consider purchasing an ActiveX control (or developing one in VB or VC++) that is linked into the VFP app's forms as needed.