How can I get the processes shown in taskbar because the way of getting the list from taskmanager is not suitable for my task.
Thanks in advance,
How can I get the processes shown in taskbar because the way of getting the list from taskmanager is not suitable for my task.
Thanks in advance,
Have a look at the Windows API CodePack.
Please provide mor details for your exact needs.
How I would do this is get a list of all of the processes and check each one to see if it has a title. If it does then it must be in the task bar. Something like this should be what you are after. Good luck :)
Process[] allProcesses = Process.GetProcesses();
foreach (Process workingProcess in allProcesses)
{
if (workingProcess.MainWindowTitle.Length > 0)
{
Console.WriteLine(workingProcess.MainWindowTitle);
}
}
UPDATE: I knew I had looked this up before and read it somewhere but couldn't remember where. Thanks Jason Evans for the link.
How to get the process names of applications in taskbar using c#?