Search results for 'Close Application'. 1 post(s) found.
To programmatically close another application, send to the application 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;
var AppHandle:THandle;
begin
AppHandle:=FindWindow(Nil, sCapt) ;
Result:=PostMessage(AppHandle, WM_QUIT, 0, 0) ;
end;
Another posts included in "Delphi"
| Controling sound volume from code (0) | 2007/09/19 |
| Copying Group of Files using Delphi with Standard Animation Dialog (SHF... (0) | 2007/09/19 |
| Create new program group in the Start menu (0) | 2007/09/19 |
| How to Change the Windows Start button bitmap (0) | 2007/09/19 |
| How to capture the output from a DOS (command/console) Window (0) | 2007/09/19 |
| How to Activate/Deactivate the Screen Saver (0) | 2007/09/19 |
| Retrieving all image links from an HTML document (0) | 2007/09/18 |
| List All Network Drives (0) | 2007/09/18 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 00:01
moneyideas
-
Subject different money making ideas
2010/01/29 08:13
moneyideas
-
Subject different money making ideas
2010/01/31 16:40
moneyideas

Prev

Rss Feed