Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / March 2008

Tip: Looking for answers? Try searching our database.

ExtractAssociatedIcon Only 32*32?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sin Jeong-hun - 31 Mar 2008 12:19 GMT
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.
Willy Denoyette [MVP] - 31 Mar 2008 16:26 GMT
> Icon.ExtractAssociatedIcon() has no parameters. Surely we need all the
> sizes of icons when we actually writing applications, but it seems
[quoted text clipped - 3 lines]
> 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.
Sin Jeong-hun - 31 Mar 2008 17:58 GMT
On Apr 1, 12:26 am, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.be> wrote:

> > Icon.ExtractAssociatedIcon() has no parameters. Surely we need all the
> > sizes of icons when we actually writing applications, but it seems
[quoted text clipped - 10 lines]
>
> Willy.

Ah... I hope Microsoft would provide more options for
ExtractAssicicatedIcon, when they make the next version of the .NET
Framework.
Thank you, Willy.
Willy Denoyette [MVP] - 31 Mar 2008 23:00 GMT
On Apr 1, 12:26 am, "Willy Denoyette [MVP]"
<willy.denoye...@telenet.be> wrote:
> "Sin Jeong-hun" <typing...@gmail.com> wrote in message
>
[quoted text clipped - 15 lines]
>
> 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.