Solved

Updating Icons

Posted on 2000-02-27
4
176 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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
bit defender blocks good applications 2 106
passing parameter in sql procedure 9 68
Problem to line 23 74
Fastest way to find and count same items VB6 16 46
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

733 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