Solved

Updating Icons

Posted on 2000-02-27
4
177 Views
Last Modified: 2010-05-02
We are developing an application that uses icons that are also being developed/modified at the same time.  Is it possible to somehow include these icons at compile time rather than design time so that we don't have to visit each form that uses a particular icon and update it manually every time an icon changes?
0
Comment
Question by:DJWalker
[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
4 Comments
 
LVL 5

Expert Comment

by:KDivad
ID: 2562316
So that if you alter the icon, then it's automatically updated in the form instead of VB using it's .frx files?
Not that I know of, unless you rewrite the .frx file(s)...
0
 
LVL 3

Accepted Solution

by:
paulstamp earned 100 total points
ID: 2562321
Use the VB Resource File editor add-in and place your icons in a resource file. Give each one a unique identifier and then use something along these lines to extract them at run time :

Set Picture1.Picture = LoadResPicture(101, vbResIcon)

where 101 is the ID of the icon you want and vbResIcon in just a constant specifying its an icon not a bitmap.

This way you can just update the RES file and all your forms will be updated automatically.

Look in the help file under LoadResPicture for more details.
0
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 2564413
You can also use VB's LoadPicture function to load the icon at run-time from a network drive. This way you can even change the icon between compiles. Just overwrite the icon-file with the new one, and as soon as the program is restarted the changes will show.
0
 
LVL 3

Expert Comment

by:paulstamp
ID: 2564461
You could load the icons at run time but from ico files but it does mean that people could overwrite or delete (accidentally or deliberately) the icon files and cause probs with the program.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

728 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