How to

get windows that are in taskbar

Published: 23. November 2011 | Updated: 23. November 2011
License: Microsoft Public License (MS-PL)
Categories: Windows
Tags: C# Windows
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.Diagnostics;

Code

Process[] processes = Process.GetProcesses();
foreach (Process process in processes)
{
    if (!String.IsNullOrEmpty(process.MainWindowTitle))
    {
        Console.WriteLine(process.MainWindowTitle);
    }
}
Send us feedback about this snippet »



Related Snippets: