Anuya
Anuya

Reputation: 8350

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[] ???

Upvotes: 3

Views: 3588

Answers (1)

Ahmed
Ahmed

Reputation: 7238

I think you can use MainWindowTitle

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

Upvotes: 3

Related Questions