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 / Languages / C# / August 2006

Tip: Looking for answers? Try searching our database.

How Microsoft does it?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JayvardhanPune - 30 Aug 2006 11:25 GMT
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?
Peter Bromberg [C# MVP] - 30 Aug 2006 12:42 GMT
J,
I am not sure if there really is a "standard" or "best practices" way of
doing this. I do know, however, that if you create an assembly with all your
images embedded as resources, perhaps with a class that has a utility method
in it to extract them, that would be quite usable and extensible.
Peter

Signature

Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

> Dear All,
>
[quoted text clipped - 22 lines]
> Most important is, will the second (2) way will have any negative
> effect on start up time?

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.