[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

VB6 ImageList control 'Invalid File Reference' errors when loading

Posted on 2006-07-10
10
Medium Priority
?
1,140 Views
Last Modified: 2012-08-14
Howdy

I have a VB6 form with an ImageList control, and am using Source Safe.  When I open one of my forms it loads fine, except that in the ImageList control all images are black, which means all images on a toolbar are black.    

Also, loading the form creates a log file that has multiple lines like....

Line 330: Property Picture in ListImage22 had an invalid file reference.
Line 334: Property Picture in ListImage23 had an invalid file reference.
Line 338: Property Picture in ListImage24 had an invalid file reference.
Line 342: Property Picture in ListImage25 had an invalid file reference.
etc. etc.

Problem is, when I copy/paste the MyFormName.frm into MyFormName.txt and read the Line 330, Line 334's, etc. they have GUIDs instead of path/file's, and when I tried to scan a couple of the GUIDs it came up empty.

My frm file does have an frx file of the same name, which I've read stores all the graphics of an .frm file, but from what I can tell it is not reading them.

Has anyone had a situation like this, and succesfully restored images in an ImageList control?

Thanks in advance.
-Jim
0
Comment
Question by:Jim Horn
[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
  • 5
  • 3
  • 2
10 Comments
 
LVL 19

Assisted Solution

by:BrianGEFF719
BrianGEFF719 earned 800 total points
ID: 17077075
Hi Jim,

Is there any way you can get to the computer that first developed this project and try searching its registry for the GUIDs?

Brian
0
 
LVL 9

Accepted Solution

by:
justchat_1 earned 1200 total points
ID: 17077674
The images used are stored in a different location then what the project file has stored...would it be possible to re-add the images?
0
 
LVL 19

Assisted Solution

by:BrianGEFF719
BrianGEFF719 earned 800 total points
ID: 17077704
Yes, add the images again, but pay close attention and make sure the indexes are all the same! This is very important, just make sure you add them in the same order they were in before.

Also, make sure you remove all the invalid images before re-adding the images.

-Brian
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 17077708
sorry I answered justchat_1's question about "would it be possible to re-add the images"

lol
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17077790
lol I should have made my comment more clear...
0
 
LVL 66

Author Comment

by:Jim Horn
ID: 17082069
Thanks for your comments guys.

I renamed frmMain.frm as frmMain.txt, and below is a snippet...    

    Begin MSComctlLib.Toolbar tbToolbar
      ImageList       =   "imlIcons"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
         NumButtons      =   29
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
            Key             =   "New"
            Description     =   "New"
            Object.ToolTipText     =   "New"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
            Key             =   "Open"
            Description     =   "Search"
            Object.ToolTipText     =   "Open"
            ImageIndex      =   2
         EndProperty

I'm on the original developer's pc (or so I think, app was first created four years ago and I've been here nine months), and did a registry search for the GUID listed, with zero results.

I also searched via Resource Editor for any .res files with images, no love there either.

With 20 images, some of them I can't find as .bmp's on my pc, I wanted to explore all possibilities of restoring the file before creating a new ImageList and populating images from scratch (with the help of Easy Icon Maker and screen shots), but it looks like that's what I'll be doing.
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17084504
Do the images show up on the developers computer? If they do we can extract them...
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17084509
Or if not and you have a compiled version use resource hacker to extract the images...
0
 
LVL 66

Author Comment

by:Jim Horn
ID: 17084694
The images were not on teh developer's computer.  

I ended up rebuilding it from scratch.  Fortunately most of the images were Windows XP/Office standard icons, and were able to just copy/paste into one folder, rename, then add to image control.  The yellow banana button, however, had to be changed, as I couldn't find a yellow banana image anywhere.

The toolbar on my fom also had to be re-associated with the images in the ImageList control, which meant listing the Image numbers in the Image controls, and typing them in to the Toolbar property dialog, Image textbox.

I'll be checking this back into VSS, but also keeping an extra copy out on the network in case the frm-frx relationship breaks again.

Thanks guys.
-Jim
0
 
LVL 9

Expert Comment

by:justchat_1
ID: 17085185
no problem...if you have the banana image in one of your programs give resource hacker a try..
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
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…
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…
Suggested Courses

650 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