Serialcoder en Français Serialcoder in English
TEL : +33 (0)9 72 13 15 17

Windows Forms FAQ resources

1. Windows Forms Deployment

1.4 How can I get a list of all processes running on my system?


Use the static Process.GetProcesses() found in the System.Diagnostics namespace.

[C#]
     Using System.Diagnostics;
     ...
     foreach ( Process p in Process.GetProcesses() )
          Console.WriteLine( p ); // string s = p.ToString();

[VB.NET]
     Imports System.Diagnostics
     ...
     Dim p As Process
     For Each p In Process.GetProcesses()
          Console.WriteLine(p) ' string s = p.ToString()
     Next p