How to get all running applications/processes in Windows with C# WinForms

1 Answer

0 votes
private void button1_Click(object sender, EventArgs e)
{
    listBox1.Items.Clear();

    // all running software, regardless of whether a window is visible

    foreach (Process process in Process.GetProcesses())
    {
        listBox1.Items.Add(process.ProcessName);
    }
}


/*
run:

conhost
dasHost
IntelAnalyticsService
msedgewebview2
msedge
IDBWMService
mc-neo-host
svchost
PowerToys.PowerOCR
...

*/

 



answered Oct 19 by avibootz
edited Oct 19 by avibootz
...