2009/10/15 14:42

How to get process id in C# like windows task manager ?


Following is simple example to get Process name and add Process name to listbox control.

As you can see below, you can get working Process by Process control. But most of the properties are supported on windows platform. If you want to access the similar properties on windows mobile, you need to use another function.

using System.Diagnostics;

.
.
.

            Process[] prs = Process.GetProcesses();

            listBox1.Items.Clear;
            foreach( Process pr in prs)
            {
                listBox1.Items.Add( pr.ProcessName);
            }

Trackback 0 Comment 0

Trackback : Cannot send a trackbact to this post.