Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I close an another program?
Message
From
15/07/2000 01:17:38
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00392323
Message ID:
00392825
Views:
11
Hi Ed,

>GetWindow as you're using it will only close child Windows of the current >Desktop window. It will find at most one occurance, and not that if the Window >in question is not active.

No, the loop in my program finds the appropriate window. I could test this also by adding a messagebox which confirms when the matching window is found.


>You'd be better off using the Wscript.Shell's AppActivate to bring the desired >application to the active state and its SendKeys method to send whatever >keystrokes were needed to shut down the application; it's documented in the >help for the Windows Scripting Host as pointed to in my signature block.

Yes, I would give it a try with WSH.

Thanks & regards
Vijay
Previous
Reply
Map
View

Click here to load this message in the networking platform