tearing at "circular dependencies between modules" in ActiveX project
I changed a new PC, but my old ActiveX project can't compile any more with error "circular dependencies between modules". I have changed the VBP Reference to right path (C:\windows\system32 to c:\windows\syswow64), but still got such error.
This ActiveX combines few other internal controls. I noticed those controls turned into picturebox already. I have to add those internal controls one by one again? any trick is available?
Re: tearing at "circular dependencies between modules" in ActiveX project
Quote:
Originally Posted by
DaveDavis
I changed a new PC, but my old ActiveX project can't compile any more with error "circular dependencies between modules". I have changed the VBP Reference to right path (C:\windows\system32 to c:\windows\syswow64), but still got such error.
This ActiveX combines few other internal controls. I noticed those controls turned into picturebox already. I have to add those internal controls one by one again? any trick is available?
I wouldn't edit that path. Windows resolves system32 to syswow64 automatically when you run a 32-bit program. But then 32-bit OS installs are so rare nowadays that it probably doesn't matter.
As for the rest, it depends on what the "internal controls" are that are failing. Check the .log files that VB generates when it can't load them.
I'd only worry about the circular dependency error after you've fixed the controls that aren't loading. I've seen that error come and go as a side effect of other things.
Re: tearing at "circular dependencies between modules" in ActiveX project
Quote:
As for the rest, it depends on what the "internal controls" are that are failing. Check the .log files that VB generates when it can't load them.
This happened to me, and they were with class and not control ....
Quote:
I've seen that error come and go as a side effect of other things.
exactly ...
Re: tearing at "circular dependencies between modules" in ActiveX project
isn't that an error u get if your class/activex depend on each other, like:
A need B, B need C, C need A
that will make it impossible to add, if the initialization is automatic.
but it could be:
A need B, B need C
here you can:
add C first, than B and lastly A
or change initialization to be manual.
Re: tearing at "circular dependencies between modules" in ActiveX project
"Circular dependencies" is a real error. For instance if you have a module with a Public Type and a class with a Public Enum you cannot use the enum in the module and the UDT in the class -- the compiler wouldn't know which to compile first.
What you do is add a *third* module and move *both* the type and the enum to it so that the original module and class now depend on this newly added module, not on each other in a circular fashion.
For an ActiveX project (DLL or OCX) best would be to add some kind of catch-all Enums class and move all public enums to it (from public user-controls and public classes that is).
cheers,
</wqw>