How to list TaskbarWindows?

delphi package - easy access to kernel objects etc.
Post Reply
nickg
Posts: 3
Joined: Fri Feb 24, 2006 8:06 am

How to list TaskbarWindows?

Post by nickg »

Hi,

found these packages when searching for a solution to the business of closing an application gracefully. Seems to me that if I can find the Applications topmost window and get its handle I can then close gracefully rather than just terminating the process.

I tried using API (EnumWindows with GetWindowText in the Enumproc in order to find the right app), but all I could get was a list of 185 processes with no window title :-{

Then I found a reference to thses packages, but there seem to be no demos. Stuff looks great but how do I use it?

Does TaskbarWindows do this and how do I call it?

TIA Nick
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Just try this:

Process('someProcess.exe').Close;

This will try to close the app gracefully. It will send a WM_CLOSE message to the main window. Please note that while it usually closes down apps like IE and Outlook without any problem, apps like WinWord or Notepad will open a message box asking the user whether he wants to save the changed files. Is that ok with you?
nickg
Posts: 3
Joined: Fri Feb 24, 2006 8:06 am

Post by nickg »

Thanks for such a prompt reply Madshi
nickg
Posts: 3
Joined: Fri Feb 24, 2006 8:06 am

Post by nickg »

A general question please, how much of your packages will work with .net? any, none?

TIa Nick
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Right now I'm not offering .net support. That might come later, but I have some other things on my to do list that I have to do first.
Post Reply