Windows Task Manager like application

cskiong used Ask the Experts™
Hi Experts,

I would like to look for a way to create a Window Task Manager (Application tab only) like application. Basically what I want is a C# 2005 application that work just like a Window Task Manager, which keep track with the status of all running desktop application (not window process).  For example, when a new desktop application is invoked, closed, not responding, changing window caption etc, my C# 2005 application should be able to detect all these changes as the Window Task Manager (application tab) does.

I have tried WMI __InstanceDeletionEvent, __InstanceCreationEvent etc.   Somehow it does not work like as what I espected.

Your kind advices, suggestion, reference to Win32 API or C# functions, or simple example are very much appreciated.

Thank you very much!

P/s: I would like to keep track with running desktop application, not the windows processes.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

The above was in C++. Also there is another one in C#.
Please check it 

Hi cskiong,
Can you please tell me whether my provided solution worked for you.

Hi Mushq,

Thanks for your fast response, however, it is not what I am looking for.
The C# version is working on the Windows Process, which is not what I am looking for.  (I only look for those appear in the Window Task Manager - Application tab, not the Processes tab).  Sometimes, the item listed in the Application tab may not appear as process in the Processes tab, for example, a folder window.

As for the C++ edition, it is somehow "hijacking" the Window Task Manager, and I think it is quite heavy for me to digest.

I really appreciate your help and effort spent on this.

However, I have eventually found a solution and I think so far it works as what I expected.  
I'm using the RegisterShellHookWindow to capture the WM_CREATE and WM_DESTROY events.  
So far I think this is the best solution I could find.

Thank you!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial