Solved

Project Images Best Practices

Posted on 2007-04-04
2
205 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

776 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