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 / .NET Framework / Compact Framework / May 2005

Tip: Looking for answers? Try searching our database.

Managed icons

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
benoit311080@gmail.com - 31 May 2005 07:08 GMT
Hi,
I need to retrieve icons of files in my .net application. Because the
method fromHandle() doesn't exist in CF, i'm using this great code that
transforms a win32 icon HICON to a managed icon:

http://www.opennetcf.org/PermaLink.aspx?guid=342bde3d-eeba-4d78-9748-29eb89ee13bf

I find this rather slow method when it is necessary to treat a big
number of files. Is not there a faster method in .NET? Thank you
Peter Foot [MVP] - 31 May 2005 13:06 GMT
The reason it's slow is that it requires building an icon on the fly from
your hicon data. An alternative would be to look at how you output the icons
from which you have a hicon. For example you could use P/Invoke to call
DrawIcon to draw the icon on a form. The story does get better in .NETCF
v2.0 as the Icon class includes the FromHandle method.

Peter

Signature

Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org

> Hi,
> I need to retrieve icons of files in my .net application. Because the
[quoted text clipped - 5 lines]
> I find this rather slow method when it is necessary to treat a big
> number of files. Is not there a faster method in .NET? Thank you

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.