Solved

Project Images Best Practices

Posted on 2007-04-04
2
207 Views
Last Modified: 2012-05-05
Greetings experts,

I have a quick "Best Practices" type question that I hope will be an easy one to answer.  

I have a VS 2005 Windows Application that will have anywhere from 80-100 icon type images.  The average file size of these images is 1KB-3KB.   I dragged them into the project resources page and they all work fine.   However, I'm concerned as to whether or not this approach will be adding too much memory overhead.  

So my question is . . .  Given the number of images in my scenario, what is the most effecient way to make the images available to my application?  

Thank you in advance,

Keith
0
Comment
Question by:kdwood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
VBRocks earned 400 total points
ID: 18851121
When you add resources to your application, they are linked by default, so no need to worry about them all being loaded into memory at once.  Here is some additional information about project resources:

Note:  For VS2005, try the following help file link:
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_vsprojopt/html/81ef0706-f495-4613-8634-f4a3a5d681b9.htm

Resources:
Items that you add to the project using the Resource Designer are placed in the Resources directory for your project. The designer information is stored in Resources.resx, and code for the resource is stored in Resources.Designer.vb

For Visual Basic, the Resource Designer generates strongly-typed resources into the My.Resources namespace.

Strongly-typed resources encapsulate access to resources by creating classes that contain a set of static, read-only (get) properties at compile time. You can consume resources using the "get" properties rather than using the GetString and GetObject methods of the ResourceManager class.

Resources also have a Persistence property that specifies whether they are linked or embedded. Linked resources are stored as files within the project; the .resx file stores a relative path to the file, and during compilation, the resource data is placed into the manifest for the application.

Linked resources are stored as files within the project; during compilation the resource data is taken from the files and placed into the manifest for the application. The application's resource file (.resx) stores only a relative path or link to the file on disk.

By default, all new resources are linked resources, as opposed to embedded.

0
 
LVL 10

Author Comment

by:kdwood
ID: 18851243
VBRocks,

Makes perfect sense.  I appreciate the clear explanation.

Thank you for your quick response,

Regards,

Keith
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question