How to display running app's like in task manager

  • Thread starter Thread starter fperfect13
  • Start date Start date
F

fperfect13

Hi,

I want to display all windows applications(not proceses) like in task
manager.
I haven't found any example of this either using WMI or
System.Diagnostics. How can it be done in c#?

Thanks.
 
I am not sure if this is exactly what you are looking for, but the Process
class has property MainWindowHandle. The property is zero if there is no
window associated with the process and nonzero if there is a window. So if a
process with window is what you are looking for, you could use
Process.GetProcesses and then select only those that have MainWindowHandle
nonzero
 
Back
Top