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 / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

multiple program icons problem - VS converts some 32bit icons to 24bit

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
SharpCoderMP - 27 Jul 2006 17:19 GMT
i'm trying to embed multiple program icons in my executable. the only
way so far i managed to do that is to embed native win32 resource file
with multiple icons. it works, but... when i create a native win32
resource file with the VS 2005 and put there my icons, VS always
converts some of the 32bit icons into 24bit - so i loose alpha blending
what makes my icons look ugly.

I did an experiment and created a icon file with full range of icon
sizes and color depths. all from 4bit through 8bit, 24bit to 32bit and
with all standard sizes from 16x16 to 64x64. i thought that maybe the
icon is converted because it does not have one of the required
versions... that did not help. after importing icon file to the win32
res file 32x32 32bit icon was converted to 24bit despite the file
already contained the 32x32 24bit version of that icon.

so my question is how can i put icon files into win32 res file and
prevent VS from converting them from 32bit to 24bit? or maybe there is
some other way to embed multiple program icons into my executable?

to create the win32 native resource file i use VS 2005 Native resource
template (File -> New -> File -> General -> Native Resource Template).
AMercer - 27 Jul 2006 18:47 GMT
I don't know if this will solve your problem about 32 to 24 bits, but I do
multiple icons differently.  I add each .ico file to the project (Project,
Add Existing Item), and set each Build Action to Embedded Resource.  The
icons are added to the exe at build time.  At runtime, I can change the icon
of form(s) by creating an Icon object from the running assembly and assigning
it to the form(s) I want.  During these evolutions, I don't make a win32
resource file - my starting point is several .ico files.  I use simple minded
766 byte .ico files, so I don't know if the above procedure will work for
your icons.  My guess is that it will work ok.

> i'm trying to embed multiple program icons in my executable. the only
> way so far i managed to do that is to embed native win32 resource file
[quoted text clipped - 17 lines]
> to create the win32 native resource file i use VS 2005 Native resource
> template (File -> New -> File -> General -> Native Resource Template).
SharpCoderMP - 27 Jul 2006 21:32 GMT
that's not the solution for me. i do not need these icons inside my
application. they are there for users, for shortcuts or associated files
icons so i could avoid distributing separate icon files with my app.

> I don't know if this will solve your problem about 32 to 24 bits, but I do
> multiple icons differently.  I add each .ico file to the project (Project,
[quoted text clipped - 27 lines]
>> to create the win32 native resource file i use VS 2005 Native resource
>> template (File -> New -> File -> General -> Native Resource Template).

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.