Solved

Updating Icons

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

948 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now