List All Running Processes

Get a list of all running Windows processes through which you can step using a foreach loop.
  1. foreach (System.Diagnostics.Process winProc in 
    System.Diagnostics.Process.GetProcesses())
  2. {
  3.     MessageBox.Show(“Process ” + winProc. Id + “: ” +
    winProc.ProcessName);
  4. }

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top