Best way to use icons

sjn78

Junior Contributor
Joined
May 4, 2003
Messages
255
Location
Australia
Usually when I create a program that has icons in it, I embed all the icons into the executable. And when I need them, just pull them out of the assembly.

I am just wondering what is the best way to handle this. Embed all icons/images into the app and then apply it to the buttons or wherever I need them manually when the control loads or by doing it at design time with image lists or just setting the image to the control.

I guess imagelists embed the icons anyway but to only the size you specify. Where the icon will have several different icons sizes in the file, so you can use it at any size that is available and avoid any loss in quality if you decide you want an image from the imagelist to be drawn larger than it was originally set to.

Any comments or thoughts would be great.
 
If you are using VS 2005 it's resource editor gives you a nice typesafe way of embedding the resources and providing access to them.

I've never been a big fan of imagelists myself (even in the vb6 days) as they always seemed a bit of a hack to get images into the executable, plus the limitations and weird runtime support never seemed quite right...

You are probably better off either sticking with your existing method, or perhaps investigating the .resx files as an alternat way if you are still with 2003 or earlier.
 
Back
Top