>>Hiya John,
>>
>>I may try this. Also, FP DOS app (it is really just .FXP) may be run from the batch file before the VFP Monitor app even starts, and I am not sure how to get process handle in this case. Didn't work much with API stuff before. :)
>
>Nick,
>
>Without the process handle it's a problem. You can only shutdown a DOS session via SendMessage() if the process has already terminated. See
"How do I close another application?". Of course, using a pif file to launch the program, can eliminate the need for this entirely.
Hi George,
So, the is no way to obtain the process handle knowing only hWND, is it? The VFP Monitor app can be shut down and restarted while the FoxPro DOS session is still running. I still can get it's hWND again after restarting the Monitor and use SendMessage(WM_DESTROY), but I would like to have more precise control on shutting down the server rather than rude WM_DESTROY. :)
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison