Solved

Updating Icons

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

760 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

23 Experts available now in Live!

Get 1:1 Help Now