I\'m trying to find a way to get the open tasks in C#. I\'ve been searching on google and can only find how to get a list of the processes. I want the onl
@abelenky17
I suspect that this will not cover all cases, for example there are processes who have several top level windows (that all appear in the task manager). Consider for example: FireFox, Windows Explorer, IE, etc... those applications can have multiple windows on the desktop. Also, it will not handle Terminal Sessions scenario's properly (because you enumerate all the processes running in the system).
@Dan C.
Doing something like this:
p.ProcessName != "explorer"
seems ok to you? It smells, bad.