Task manager

G

Guest

Hi

Now that I have a list of running processes I realize, that it's difficult to make a Task Manager application basing on it

First, the process names are not the same thing that the applications titles

Second, for exemple, when I have Contacts running, I see it as poutlook.exe (the same file is responsible for the Calendar). The Contacts shortcut contains the fllowing line "21#:MSCONTACTS?outres.dll,-10000"

I found an article on www.pocketpcdn.com telling that "Running programs list is accessed via Settings->System->Memory applet (Running Programs tab). But in fact this list displays not programs but titles of top-level windows"

So my question: Maybe, there is another way, but the list of running processes, to get the list of running user applications

Thank you
 
C

Chris Tacke, eMVP

Depends on what you want to show. The control panel just enumerates
top-level windows and show's their captions. It actually has nothing to do
with processes.

-Chris


Gloomy said:
Hi,

Now that I have a list of running processes I realize, that it's difficult
to make a Task Manager application basing on it.
First, the process names are not the same thing that the applications titles.

Second, for exemple, when I have Contacts running, I see it as
poutlook.exe (the same file is responsible for the Calendar). The Contacts
shortcut contains the fllowing line "21#:MSCONTACTS?outres.dll,-10000".
I found an article on www.pocketpcdn.com telling that "Running programs
list is accessed via Settings->System->Memory applet (Running Programs tab).
But in fact this list displays not programs but titles of top-level
windows".
So my question: Maybe, there is another way, but the list of running
processes, to get the list of running user applications?
 
G

Guest

Yes, now I begin to realize it. But in fact I need both: a Process manager (I have it working already) and a Task manager - just like in Win XP. So I wonder how I could make a Task Manager: a list of applications with their icons and possibility to close / switch to?

Thanks
 
N

Neville Lang

Take a look at a product called Pocket Task Manager (freeware) from
www.cetoolbox.com. I found it useful and may be just what you want.

Regards,
Neville Lang



Gloomy said:
Yes, now I begin to realize it. But in fact I need both: a Process manager
(I have it working already) and a Task manager - just like in Win XP. So I
wonder how I could make a Task Manager: a list of applications with their
icons and possibility to close / switch to?
 
G

Guest

Thank you, Neville, but I'm trying to make similar application myself with .Net CF...
 
A

Alex Feinman [MVP]

Task manager applications usually work by walking the list of top-level
windows using EnumWindows and then GetWindowThreadProcessId to obtain the
Process IDs. The process IDs can be matched to the information retrieved
from toolhelp (process manager). To get an icon associated with window, send
it WM_GETICON message. To convert the hIcon to the CF Icon object see
http://www.opennetcf.org/PermaLink.aspx?guid=342bde3d-eeba-4d78-9748-29eb89ee13bf

The only problem with the above is that EnumWindows requires a callback
function which is not supported in CF. You can overcome restriction this by
using GetWindow instead.

--
Alex Feinman
---
Visit http://www.opennetcf.org
Gloomy said:
Yes, now I begin to realize it. But in fact I need both: a Process manager
(I have it working already) and a Task manager - just like in Win XP. So I
wonder how I could make a Task Manager: a list of applications with their
icons and possibility to close / switch to?
 
P

Paul G. Tobey [eMVP]

Or you might really show the process list via ToolHelp APIs. This is what
my Telnet server does. It shows the name of the EXE running and the process
ID. If the user wants to kill the process, he sends a command like 'STOP
80fe0332' and that process ID is stopped in as clean a way as is possible
(tries to send WM_QUIT, etc., etc.).

Paul T.
 
A

Alex Feinman [MVP]

You can start with what GetDesktopWindow returns and the use GetWindow(hWnd,
GW_WNDNEXT)

--
Alex Feinman
---
Visit http://www.opennetcf.org
Gloomy said:
And how do I loop this function to get the top-level windows? What is the
value I shoud pass to the parameter hWnd of GetWindow?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top