Listing Running Processes in c#.net

1:42 AM
1. Add List box on a Forms.
2. Now add a reference to System.Diagnostics
Code:



Process[] curProcesses = Process.GetProcesses();

            foreach (Process p in curProcesses)
            {
                listBox1.Items.Add(p.ProcessName);
            }


Output:


0 comments:

Post a Comment