0

Hi I am working on windows form. I am displaying the number of running processes across multiple virtual desktops..It is working fine. no problem in that. Please see the image...enter image description here

Now i want to display the icon of respective process with name. So can anyone tell me it is possible or not. If YES then please give some idea. so i can achieve it. Thanks for helping me.

SK.
  • 4,174
  • 4
  • 30
  • 48
  • Questions must **demonstrate a minimal understanding of the problem being solved**. Tell us what you've tried to do, why it didn't work, and how it *should* work. See also: [Stack Overflow question checklist](http://meta.stackexchange.com/questions/156810/stack-overflow-question-checklist) – Danny Beckett Jul 01 '13 at 09:59

1 Answers1

1

You can get the icon using Icon.ExtractAssociatedIcon

foreach (var process in Process.GetProcesses())
{
     var icon = Icon.ExtractAssociatedIcon(process.MainModule.FileName);
}

See: Get File Icon used by Shell for more information about icons.

Community
  • 1
  • 1
Nisd
  • 1,068
  • 9
  • 19