Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I manage (add - delete) icon resources in VB.NET Express 2005?

Posted on 2007-03-26
6
Medium Priority
?
319 Views
Last Modified: 2013-11-27
I'm trying to write a VB.NET Express 2005 Windows application. I would like to store the various icons in the application resources.
Here's what I'm doing:  I want icons on some menu items, a toolbar and on form buttons. I click on the menu item and in the properties box I click on the ... on Images to add an image to the menu. I have the choice of Local resource or Project resource file.
If I always choose local resource file, it all works fine, but I don't know if that will work when the application is running on a system without the same path to the icons (png files).

So I choose Project resource file and add the image to it and it seems to work, but if I make ANY changes to the list of resources (like delete one I decided I don't need), the application doesn't build any more and in fact seems to crash. This happens even if I am NOT using the image for anything!

Deleting the image from the resources folder (resources.resx) seems to work until I try to run or build the application. Even though it was deleted, when I try to build the app again, I get errors that the resource isn't available. To fix it, I have to delete the menu completely and start over.

What's the right (or best) way to use/manage images (icons) in menus, form buttons and toolbars?

I need to be able to add new images for other forms / buttons / menu items later without messing up what I've already done. Please help me understand the best (or right) way to do this.

Thanks,

Ron
0
Comment
Question by:weiroblpay
[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
  • 4
  • 2
6 Comments
 
LVL 15

Accepted Solution

by:
JackOfPH earned 2000 total points
ID: 18797434
0
 
LVL 15

Expert Comment

by:JackOfPH
ID: 18797438
0
 
LVL 1

Author Comment

by:weiroblpay
ID: 18800617
This seems to work until I build the app and try to deploy it.
What happens to the resources when it's built and deployed?  Do the icons / images go with it somehow or will it only work on my development computer?

Thanks,

Ron
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 15

Expert Comment

by:JackOfPH
ID: 18804669
>>> Do the icons / images go with it somehow or will it only work on my development computer?

The icons / images goes with it. The compiler will create a resources file that contains the icons and images. So, If you deploy the program your images / icons were also created.
0
 
LVL 15

Expert Comment

by:JackOfPH
ID: 18804693
Quoted from above links:

"A resource is any nonexecutable data that is logically deployed with an application."

The main advantage of resource files is that they're integrated directly into your Visual Basic project for maximum execution speed and minimum hassle packaging and deploying your application.

0
 
LVL 1

Author Comment

by:weiroblpay
ID: 18805100
Thank you for your help and additional comments about deployment.

Appreciate it.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

705 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