Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Project Images Best Practices

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

636 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