How to Close Another Application by Windows Caption | |||
| |||
a WM_QUIT message. "Window caption" is the caption of the window that you are sending the message to. Usage: if not KillApp('Window caption') then ShowMessage('App not closed') ; Here's the source code can kill the application by windows caption. function KillApp(const sCapt: PChar) : boolean; var AppHandle:THandle; begin AppHandle:=FindWindow(Nil, sCapt) ; Result:=PostMessage(AppHandle, WM_QUIT, 0, 0) ; end; Tags: AuxGetVolume Delphi FindWindow Kill Application PostMessage Windows Caption chkdsk | |||
| |||
| |||
Login for comment |