简体   繁体   中英

How to get the process names of applications in taskbar using c#?

I want to get the list of process names for the applications which are in task bar. How to get that? Is there any way to filter the criteria from process[] ???

I think you can use MainWindowTitle

            Process[] processes = Process.GetProcesses();
            foreach (var item in processes)
            {
                if(item.MainWindowTitle.Length > 0)
                    Console.WriteLine(item.MainWindowTitle);
            }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM