I am working my way through the walk-through and I got as far as trying to load the control into the VB 6 toolbox.
I can load the DLL as a reference, but not as an ActiveX Component. When I try I get the message "InteropForms: The file [...] was not registerable as an ActiveX Component.".
I can create the control at runtime as a normal COM object.
Jonathan
EDIT:
If I try RegSvr32 I get this message:
[...] was loaded, but the DllRegisterServer entry point was not found. This file can not be registered.
EDIT 2:
If i register it with RegAsm, it appears in the component's list. However I get a error开发者_如何学编程 loading the DLL if I check it.
Not a full answer, but everything works if I run VB 6 and VS 2010 on the same machine. There must be something in the compile or post-compile step that I'm missing.
EDIT:
Ok, so what you need to do is run regAsm
with the /codebase
and /tlb
options.
EDIT 2:
If you make any changes to the .NET dll, make sure you reregister it.
https://www.codeproject.com/Articles/18954/Interop-Forms-Toolkit-2-0-Tutorial**
- register your library first
like this If you want to add dll file in you vb6 project
Don't do
regasm labelwinform.dll /tlb:labelwinform.dll /codebase
It will not register the dll.I face this problem so
Solution
regasm labelwinform.dll /tlb:labelwinform.tlb /codebase
add reference in vb6 Project menu->references
add component in vb6 Project menu->component
Axtivex component not registerable error due to dll file not registered properly in production(installing application on another computer or customer computer).So my i approach is advanced installer .it is my personal opinion.
精彩评论