Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to quit a VFP EXE within another VFP EXE ?
Message
From
04/07/1999 12:35:57
 
 
To
04/07/1999 11:58:15
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00237334
Message ID:
00237340
Views:
11
>Does anyone know how to quit a VFP EXE within another VFP EXE ?
>For example, i have 2 VFP EXE, i name it A.exe and B.exe.
>First, i run A.exe and in A.exe, i run B.exe.
>In B.exe, i wanted to quit A.exe, is this possible ?
>
>Hope you can solve my problem, thank you.

If you launch the second .EXE via DO B.EXE, then it's running in the context of the first VFP's application space - a QUIT will kill both executables.

If you've fired the second .EXE with the RUN command (or an equivalent API call), you'll need to establish some interprocess communications capability, such as implementing a DDE interface or establishing a COM interface in the first application that will accept the instruction to quit. Alternatively, you can discover the Windows handle of the first application and use the Windows API Sendmessage() call to tell it to shut down - there are examples of how this is done in the Files Section or FAQ here on UT.

>
>Alaster
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
Reply
Map
View

Click here to load this message in the networking platform