IProcess.Close

delphi package - easy access to kernel objects etc.
Post Reply
John
Posts: 2
Joined: Mon Jan 02, 2006 2:20 pm

IProcess.Close

Post by John »

There is an application. It can be minimized to trayicon (no taskbar icon).
I used next code in version 2.x

Code: Select all

Process('process_name_here').Windows_.Close;
it works fine. Application even hidden were closed succesuful without any data lose.

Now I am using version 3. The same code. It doesn't work (it works in strange way). After calling the

Code: Select all

Windows_.Close;
target application dissapers from screen, from trayicon, but still remain in the list of processes.

I look into help
You can close this process by either calling "Close" (WM_CLOSE to the main window)
and I think the problem is in wrong detection of main window.

What I am doing wrong or how to solve the problem?

Thanks!
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Does Process('process.exe').Close work?
John
Posts: 2
Joined: Mon Jan 02, 2006 2:20 pm

Post by John »

Process('process.exe').Close
it doesn't close the target application normal, like close button pressed - it just shutdown the application.

I tried next combination:
Process('process.exe').Windows_.Close
Process('process.exe').Close

it works, but sometimes the process still remain in memory.

Any sugestions?
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Does that process have no, one or multiple buttons in the taskbar? Does the program always close down correctly when you right click on the taskbar button(s) and say "close" on those?
Post Reply