ProTracker was a utility I wrote in C++. Here is C# version of this utility.
This program is similar to Window NT Task Manager. It displays current running processes with their process id, memory uses. The Kill Process let you kill the process. This is a pre version of this utility.
I have used the Process class to do so. Process.GetProcesses() return all the process in an array with the corresponding information such as memory used, thread priority, process ID etc.
procList = Process.GetProcesses();
for ( int i=0; i<20; i++)
{
iPhysical = procList[i].WorkingSet / 1024;
iVirtual= procList[i].VirtualMemorySize / 1024;
listView1.InsertItem(listView1.ListItems.Count, procList[i].ProcessName,
0, new string[]{procList[i].Id.ToString(), procList[i].StartTime.ToString(),
procList[i].BasePriority.ToString(), iPhysical.ToString(),
iVirtual.ToString() } );
}
The Kill method is used to kill the process.
if ( procList[i].Id == iProcID )
{
procList[i].Kill();
} ![]()
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.

KenPosted Jul 3, 2007, 5:23 PM
Hi, the source code you've posted is missing the project file, it only has the cs file Please post the full source code Thank you