Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lost component references

Status
Not open for further replies.

chelandrew

IS-IT--Management
Oct 8, 2001
25
US
I'm an experienced programmer but new to VB. I inherited a project that I modified and have successfully compiled. I had to reboot my machine, now when I open the project it can't find references to ocx, dll etc. The directories it is trying to find them in are not what it previously looked in. Is there a file or registry entry that holds this info and can I get back the original references?
 
A relative newbie myself, I'd take a pad of paper and
simply write down the files that it says it can't locate.
Then I'd track down each of those files and place a copy into the same directory that the project file (the ".vbp")
is located. This always works, because the compiler will
always look for things in that directory before it searches
for them in the search path.
 
Yes, this will work if I knew which files to copy since there are multiple versions available. I'd just like to understand what happened and why so I can prevent this from happening again. Thanks for the reply.
 
try opening your .VBP file in notepad

one of mine begins with the following

Type=Exe
Reference=*\G{EF53050B-882E-4776-B643-EDA472E8E3F2}#2.7#0#C:\PROGRAM FILES\COMMON FILES\SYSTEM\ADO\msado15.dll#Microsoft ActiveX Data Objects 2.7 Library
...
Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
Form=frmStartup.frm
Class=AuthorInfo; AuthorInfo.cls
...
RelatedDoc=Data\with logo\FirstContact.htm
...

note the highlighted data

VB stores the relative paths to components (relative to the folder where your .VBP file is)

Maybe you could figure out the paths of the missing files from there
 
Thanks, this helped a lot. After more investigation, it appears that the component refs are stored in the HKEY_LOCAL_MACHINE registry and are global to all projects. Is this right? Is there a way to keep the references at the project level?
 
Whalco'
FYI the easy way to put a shortcut to another post in your answer is :
thread 708-387563 , but if you miss out the space between thread and 708, it automatically provides a link when you post, so what you see in th eactual post is:
thread708-387563
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top