Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control a non-VFP form from VFP
Message
From
07/11/2002 10:31:13
 
 
To
07/11/2002 10:20:45
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00719792
Message ID:
00719802
Views:
11
This message has been marked as a message which has helped to the initial question of the thread.
>I'd like to send a carriage return to another application's pop-up window from VFP. I can get the hWnd handle of the window, but don't know if it's possible (or how to) to pass the keypress to the other form.
>
>Any assistance would be appreciated.

If you have the hWnd of the other form, you can direct a keystroke to it using the SendMessage() API call, discussed in the API section here on UT.

If you know the Window title, or a part of it, for the other app's pop-up window, it's really trivial to do using the Wscript.Shell's AppActivate() and SendKeys() methods:
oShell = CREATEOBJ('Wscript.Shell')
oShell.AppActivate("The popup menu title")
oShell.SendKeys('{Enter}')
oShell = NULL
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform