Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "extractassociatedicon" in [All]

shell32

.
Summary
.

static extern IntPtr ExtractAssociatedIcon(IntPtr hInst, StringBuilder lpIconPath,

.

Shared Function ExtractAssociatedIcon _

.

Both the ExtractAssociatedIcon and 'System.Drawing.Icon.ExtractAssociatedIcon' extract only a 32x32 pixels icon.

.

The ExtractAssociatedIcon function also does not execute as documented. The documentation states that

.

Consider a Winform application with a OpenFileDialog that helps pick some file. This is then passed to the ExtractAssociatedIcon method to get the icon and display in a picture box.

.

    static extern IntPtr ExtractAssociatedIcon(IntPtr hInst, StringBuilder lpIconPath,

.

        IntPtr handle = ExtractAssociatedIcon(this.Handle, strB, out uicon);

.

Use static method 'System.Drawing.Icon.ExtractAssociatedIcon(string filePath)' in assembly 'System.Drawing.dll' (.net 2)

.
Documentation
[ExtractAssociatedIcon] on MSDN
.

Icon.ExtractAssociatedIcon(sFile)

.

Icon.ExtractAssociatedIcon(sFile)

.

If you only want to get the icon you can use managed System.Drawing.Icon.ExtractAssociatedIcon(String file)


 
Access PInvoke.net directly from VS: