Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending f.ex LEFTARROW to another VFP application
Message
De
31/01/2001 19:21:50
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00470996
Message ID:
00471038
Vues:
33
>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.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform