How Microsoft does it?

J

JayvardhanPune

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,
 
J

JayvardhanPune

Thanks Dennis for replying.

The solution you gave, already gets impleted automatically when you add
a resource file. (I am using VS2005 and .NET2.0) A
ResourceFileName.Designer.cs file gets created with the resource file
which provides all the coding support you are talking about using
ResourceManager class.

Thanks again for showing interest in my problem.
 

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

Similar Threads


Top