What changes my OCX reference to and OCA reference 
Author Message
 What changes my OCX reference to and OCA reference

I have a complex collection of VB6 projects that I inherited.  Every once in
a while I "do something" that causes my projects to complain creating a
form.log file.  The messages were extremely confusing since they complained
about being unable to load "standard" controls like the comdlg32.  After
some experimentation if found that I can fix the problem by deleting a
reference from the .vbp file.  For example I deleted :

Reference=*\G{B6141119-BB68-441E-BF99-B8F76E263D0C}#1.2#0#C:\WINDOWS\System3
2\comdlg32.oca#Microsoft Common Dialog Control 6.0 (SP3)

and reloaded the .vbp file and the system "magically" added the following
line to the .vbp file.

Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx

My questions are:

What would change the comdlg32.ocx reference to an comdlg32.oca reference?
Where can I find information on what VB is Magically doing behind the
scenes?  I wouldn't care if it didn't{*filter*}thing up but until I discovered
this technique for fixing the problem I lost a lot of productivity!

Any assistance would be appreciated.

Ben



Mon, 24 Oct 2005 08:34:44 GMT  
 What changes my OCX reference to and OCA reference
If you add Comdlg32.ocx as a reference to the project, there will be such a
line in the VBP file:

Reference=*\G{B6141119-BB68-441E-BF99-B8F76E263D0C}#1.2#0#C:\WINDOWS\System3
2\comdlg32.oca#Microsoft Common Dialog Control 6.0 (SP3)

However, I am not sure why it is changed "magically", did you also add this
file as a component in the original project?

Luke

(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Mon, 24 Oct 2005 19:13:01 GMT  
 What changes my OCX reference to and OCA reference
The "Object=" is correct.... the "Reference=" is not. If you exit VB and the Ref= is
stored in the vbp, the next time you open, you'll get the log file warning. An oca file is
a typelib for the control you're working with. VB is *not* supposed to permanently store a
reference to the oca. This happens to me as well. It seems like some kind of OS timing
problem to me. It was rare before updating to Win2k/XP. I also get a few errors similar to
"can't write vbp file" while saving the project. Clicking "Save" again fixes it.
I have no fix to the problem... except that I use Source Safe. When I get the error and
all controls turn to pictureboxes, I just undo the checkout and re-load the project.
Sometimes it's stubborn and I have to actually exit and restart VB before reloading. It's
frustrating when you're in a hurry but, other than that, it's just a minor problem.

--
Ken Halter - MS-MVP-VB - http://www.*-*-*.com/



Quote:
> I have a complex collection of VB6 projects that I inherited.  Every once in
> a while I "do something" that causes my projects to complain creating a
> form.log file.  The messages were extremely confusing since they complained
> about being unable to load "standard" controls like the comdlg32.  After
> some experimentation if found that I can fix the problem by deleting a
> reference from the .vbp file.  For example I deleted :

> Reference=*\G{B6141119-BB68-441E-BF99-B8F76E263D0C}#1.2#0#C:\WINDOWS\System3
> 2\comdlg32.oca#Microsoft Common Dialog Control 6.0 (SP3)

> and reloaded the .vbp file and the system "magically" added the following
> line to the .vbp file.

> Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx

> My questions are:

> What would change the comdlg32.ocx reference to an comdlg32.oca reference?
> Where can I find information on what VB is Magically doing behind the
> scenes?  I wouldn't care if it didn't{*filter*}thing up but until I discovered
> this technique for fixing the problem I lost a lot of productivity!

> Any assistance would be appreciated.

> Ben



Mon, 24 Oct 2005 22:25:05 GMT  
 What changes my OCX reference to and OCA reference
Thanks Ken,

I agree that it is a minor problem now that I know how to fix it.  But it
cost me hours trying to figure out what was going on since I was not
previously a VB programmer.  I presume that if I could learn more about how
VB creates these files I'll be better prepared to handle the "anomalies"
that creep in.

Any suggestions where I can find more details on how things work behind the
scenes?

Ben


Quote:
> The "Object=" is correct.... the "Reference=" is not. If you exit VB and
the Ref= is
> stored in the vbp, the next time you open, you'll get the log file

warning. An oca file is
Quote:
> a typelib for the control you're working with. VB is *not* supposed to
permanently store a
> reference to the oca. This happens to me as well. It seems like some kind
of OS timing
> problem to me. It was rare before updating to Win2k/XP. I also get a few
errors similar to
> "can't write vbp file" while saving the project. Clicking "Save" again
fixes it.
> I have no fix to the problem... except that I use Source Safe. When I get
the error and
> all controls turn to pictureboxes, I just undo the checkout and re-load
the project.
> Sometimes it's stubborn and I have to actually exit and restart VB before
reloading. It's
> frustrating when you're in a hurry but, other than that, it's just a minor
problem.

> --
> Ken Halter - MS-MVP-VB - http://www.*-*-*.com/
the groups..



> > I have a complex collection of VB6 projects that I inherited.  Every
once in
> > a while I "do something" that causes my projects to complain creating a
> > form.log file.  The messages were extremely confusing since they
complained
> > about being unable to load "standard" controls like the comdlg32.  After
> > some experimentation if found that I can fix the problem by deleting a
> > reference from the .vbp file.  For example I deleted :

Reference=*\G{B6141119-BB68-441E-BF99-B8F76E263D0C}#1.2#0#C:\WINDOWS\System3

- Show quoted text -

Quote:
> > 2\comdlg32.oca#Microsoft Common Dialog Control 6.0 (SP3)

> > and reloaded the .vbp file and the system "magically" added the
following
> > line to the .vbp file.

> > Object={F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0; comdlg32.ocx

> > My questions are:

> > What would change the comdlg32.ocx reference to an comdlg32.oca
reference?
> > Where can I find information on what VB is Magically doing behind the
> > scenes?  I wouldn't care if it didn't{*filter*}thing up but until I
discovered
> > this technique for fixing the problem I lost a lot of productivity!

> > Any assistance would be appreciated.

> > Ben



Mon, 24 Oct 2005 23:57:43 GMT  
 What changes my OCX reference to and OCA reference
Luke,

According to Ken the reference is wrong and he too is experiencing this
"magical" transformation.   I wish MS would acknowledge it as a bug and fix
it.  At least document the process so that us mere mortals can figure out
what is going on.

Ben



Quote:
> If you add Comdlg32.ocx as a reference to the project, there will be such
a
> line in the VBP file:

Reference=*\G{B6141119-BB68-441E-BF99-B8F76E263D0C}#1.2#0#C:\WINDOWS\System3
Quote:
> 2\comdlg32.oca#Microsoft Common Dialog Control 6.0 (SP3)

> However, I am not sure why it is changed "magically", did you also add
this
> file as a component in the original project?

> Luke

> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)



Tue, 25 Oct 2005 00:00:15 GMT  
 What changes my OCX reference to and OCA reference


Quote:
> Thanks Ken,

> I agree that it is a minor problem now that I know how to fix it.  But it
> cost me hours trying to figure out what was going on since I was not
> previously a VB programmer.  I presume that if I could learn more about how
> VB creates these files I'll be better prepared to handle the "anomalies"
> that creep in.

> Any suggestions where I can find more details on how things work behind the
> scenes?

Sorry... I've never seen a document that describes how/why/what's inside a vbp file. All I
know is from experience.

Quote:
> Ben

--
Ken Halter - MS-MVP-VB - http://www.mvps.org/vbsight - Please keep it in the groups..


Tue, 25 Oct 2005 03:08:30 GMT  
 What changes my OCX reference to and OCA reference

thoughts were released on Thu, 8 May 2003 12:08:30 -0700
bearing the following fruit:

Quote:


>> Thanks Ken,

>> I agree that it is a minor problem now that I know how to fix it.  But it
>> cost me hours trying to figure out what was going on since I was not
>> previously a VB programmer.  I presume that if I could learn more about how
>> VB creates these files I'll be better prepared to handle the "anomalies"
>> that creep in.

>> Any suggestions where I can find more details on how things work behind the
>> scenes?

>Sorry... I've never seen a document that describes how/why/what's inside a vbp file. All I
>know is from experience.

>> Ben

Either my newsread or yours, but all your posts seem to have
long line lengths, I have to scroll to read your posts.

J

--

I'm a psychic amnesiac.
I know in advance what I'll forget.

(Lee Daniel Quinn)



Tue, 25 Oct 2005 16:12:56 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. help : OCX/OCA/ missing reference

2. Class of control was not a loaded control class - Reference Replaced with unknown .OCA file

3. reference (.dll) vs. componen t(.oca)

4. oca references

5. Help: Creating a reference to OCX hangs VB and makes OCX unuseable

6. References Collection of a Referenced MDB

7. References: Update References in MDE to other MDEs

8. Referencing object in form in code / Subform reference problem in code

9. Cross Reference - Reference Not Found

10. reference to a non-shared member requires an object reference

11. dotnet Reference to non-shared member requires object reference - Global.asax.vb

12. Reference to a non-shared member requires an object reference

 

 
Powered by phpBB® Forum Software