?
Solved

Project Images Best Practices

Posted on 2007-04-04
2
Medium Priority
?
209 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 1600 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

800 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