Possible Duplicate:
Can I get the icon associated with an installed printer through .Net?
How do I retrieve icons associated with printers with C#.NET? I would ideally like to have icons shown in "Printers and Devices" folder for printers to be used in my application.
One way is to hard-code the path to the folders with installed printers and retrieve the icons manually one after another. This question was already asked here.
However, this approach relies on scanning a given folder, get the associated printers, match the printer names with the ones that were retrieved and display them.
This approach can be flaky for two reasons:
This involves hard-coding the location to the printers (which can vary by OS/version)
There is no guarantee that the printer names displayed will match up with the printer names already enlisted with the application.
Is there a programmatic/managed approach which does not involve scanning/manual approach, but icon could be retrieved as property of some managed .NET object ?