A console based application to list all processes. Compiled and tested using VS 2010.

c# Code:
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Diagnostics;
  6.  
  7. namespace ListProcesses
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.            
  14.             Process [] procList = Process.GetProcesses();
  15.  
  16.             foreach (Process pr in procList)
  17.             {
  18.                 Console.WriteLine(pr.ProcessName+ " " + pr.MainWindowHandle);
  19.             }
  20.             Console.ReadKey();
  21.         }
  22.     }
  23. }