Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Close Another Application
Message
From
03/04/2000 04:10:29
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Close Another Application
Miscellaneous
Thread ID:
00354201
Message ID:
00354201
Views:
65
I have followed the instructions in the KB #449 from George Tasker to close another application from within VFP.

#DEFINE WM_DESTROY 0x0002
#DEFINE WM_CLOSE 0x0010
DECLARE INTEGER SendMessage IN Win32API;
INTEGER hwnd, INTEGER uMsg,:
INTEGER wParam, INTEGER lParam
* lnhWnd is the Window handle to close
* Close and allow prompt to save changes
= SendMessage(lnhWnd, WM_CLOSE, 0, 0)
* Close without allowing prompt
= SendMessage(lnhWnd, WM_DESTROY, 0, 0)

I use Is_run function to get the window handle.

But I still have problem because the application is not removed completely from Windows task list and Windows task bar, its window is still on the taskbar and also in the task list, so I have to do one more step that is Ctrl-Alt-Del and End Task to close the application window.

Thanks for your help,
Regards,
Next
Reply
Map
View

Click here to load this message in the networking platform