#DEFINE WM_CLOSE 0x10 declare integer SendMessageA in "user32" as "SendMessage" integer hwnd, integer wMsg, integer wParam, integer lParam =SendMessage(lnwnd,WM_CLOSE, 0, 0)FWIW, this is something you have to look at and see if it what you really want to do. Simply shutting down an application in the middle of something could cause problems. If it is a database application using network files (not back-end) then data corruption could occur as a result. Just my $0.02.