Home » FAQ » WinForms » Win32 » How do I get the associated Icon from a file in the file system
Here is a sample prepared by Matthias Heubi that uses interop to access SHGetFileInfo to retrieve icons.
You could also use the ExtractIconEx native api via PInvoke to extract the app icon.
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with