Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control a non-VFP form from VFP
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00719792
Message ID:
00719862
Views:
13
>>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
Ed,

I think you may have left out an important part...waiting for the app to activate as we discussed in the WSH series on VFUG.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform