ExtractAssociatedIcon Only 32*32?

  • Thread starter Thread starter Sin Jeong-hun
  • Start date Start date
S

Sin Jeong-hun

Icon.ExtractAssociatedIcon() has no parameters. Surely we need all the
sizes of icons when we actually writing applications, but it seems
that ExtractAssociatedIcon returnes only one size, 32*32. How can I
get other sizes like 16*16, 48*48? Is it impossible without P/Invoke?
If there is a pure .NET way to do this please give me a tip. (If there
isn't, what the heck is the rationale for providing only 32*32?) Thank
you.
 
Sin Jeong-hun said:
Icon.ExtractAssociatedIcon() has no parameters. Surely we need all the
sizes of icons when we actually writing applications, but it seems
that ExtractAssociatedIcon returnes only one size, 32*32. How can I
get other sizes like 16*16, 48*48? Is it impossible without P/Invoke?
If there is a pure .NET way to do this please give me a tip. (If there
isn't, what the heck is the rationale for providing only 32*32?) Thank
you.


Icon.ExtractAssociatedIcon wraps the shell32 ExtractAssociatedIcon API which
knows only the 32X32 format.
Your only option is to PInvoke shel32's SHGetFileInfo, you might get more
info from MSDN and http://pinvoke.net for a method declaration.

Willy.
 
Icon.ExtractAssociatedIcon wraps the shell32 ExtractAssociatedIcon API which
knows only the 32X32 format.
Your only option is to PInvoke shel32's SHGetFileInfo, you might get more
info from MSDN andhttp://pinvoke.netfor a method declaration.

Willy.

Ah... I hope Microsoft would provide more options for
ExtractAssicicatedIcon, when they make the next version of the .NET
Framework.
Thank you, Willy.
 
Icon.ExtractAssociatedIcon wraps the shell32 ExtractAssociatedIcon API
which
knows only the 32X32 format.
Your only option is to PInvoke shel32's SHGetFileInfo, you might get more
info from MSDN andhttp://pinvoke.netfor a method declaration.

Willy.

Ah... I hope Microsoft would provide more options for
ExtractAssicicatedIcon, when they make the next version of the .NET
Framework.
Thank you, Willy.




This has nothing to do with the framework, it's the underlying API
(shell32.dll) which only supports 32X32 bit ICON's.
All they could do is wrap the SHGetFileInfo, but this ain't gonna happen
because Windows.Forms will not get enhanced.

Willy.
 
Back
Top