"LoanWolf" <Lo******@discussions.microsoft.comschrieb:
I'm working on a Windows Explorer-like application.
What is the best way to find out what application is set to open a
particular type of file? Is there a function to do this? Do I have to go
through the registry and check ClassesRoot?
Also, once I have the application, I want to be able to get the icon for
that application. How would I get this?
You can determine a file's icon using 'Icon.ExtractAssociatedIcon' in .NET
2.0. To determine the application associated with a particular file type,
you will have to use p/invoke ('FindExecutable', 'AssocQueryString').
Determining a file's associated application
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=findassociatedapp&lang=en>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>