How Microsoft does it?

J

jayvardhan.patil

Dear All,

I am creating a Image Library and want to know what can the best and
standard procedure to do this.

Concept is to have all the images needed by all projects (dlls and
exes) in the product at a central place (in a single DLL) making it
easy to distribute and maintain.

There are 2 ways of doing this.
1) Creating a new project, add all the images to it using "Add Existing
Item" and set Build Action=Embeded Resource for each image.
OR
2) Creating a new project>Add new Item>Resources File and then adding
all the images to it and setting Build Action=Embeded Resource for each
image. Doing this will provide me a strongly typed DLL which will
provide a property like access to all images. But .resx are mainly for
localization. And here I am not localizing images.

My question is what is the standard way of doing this?
Do you guys know pros or cons of any of these methods?
Is anybody there knowing how Microsoft do it??? (When they need to
create an image library)
Any links or articles for this?
Most important is, will the second (2) way will have any negative
effect on start up time?

Regards,
 
C

Cowboy \(Gregory A. Beamer\)

Resource files, while used for localization, are a great tool for
non-localized resources, as well. I gives you a nice dictionary of items to
choose from. The other option may well work, but goes against best
practices.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top