Basically I've got this huge project to convert a program in VB6 to a .net framework.
So because the program is so big, my plan is to take some of the VB6 functions in the program now and converted them to a .net DLL and then instead of the VB6 just calling a function it its module, it would call the new function in my new DLL. Over the course of a year I should have all the major functions converted over and in production and then I'll save the GUI interface for last.
However I am having a problem seeing the Members of my Class in VB6
Here is what I did to create a small test to recreate the problem I am having
So my problem is how do I get the Members of ClsLab to show up in VB6?
When I reference the DLL in a VS2010 Project, they show up. But they do not show up in VB6.
Its going to be a very challenging year for me if I cannot get the members of these functions show up in VB6.
Thanks,
-Jeff
So because the program is so big, my plan is to take some of the VB6 functions in the program now and converted them to a .net DLL and then instead of the VB6 just calling a function it its module, it would call the new function in my new DLL. Over the course of a year I should have all the major functions converted over and in production and then I'll save the GUI interface for last.
However I am having a problem seeing the Members of my Class in VB6
Here is what I did to create a small test to recreate the problem I am having
- Created a Class Library Project in VS2010
- In Compile Properties of the DLL I checked to Register for COM interop
- I selected Sign the Assembly (with no password and gave it a nice name)
- I created a public function HW in the class which is also public. The function just returns Hello World ect ect. Just a sting.
- I built my project which created 4 files in the bin/debug directory (DLLTest.dll, DLLTest.pdb, DLLTest.tlb and DLLTest.xml)
- I then registered the DLL by creating a .bat file (Call C:\Windows\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe "[MY PATH]\DLLTest.dll" /codebase /tlb:"[MY PATH]\DLLTest.tlb" and running it. With a pause on the .bat file I was able to see it registered correctly.
- Next I opened up a new VB6 Project and selected Standard .exe
- I added a reference to the DLLTest from the list. (Listed under DLLTest in the list of References)
- In the form load I set "Dim MyTest As New DLLTest.ClsLab (This is where my HW function is)
- I then typed MyTest. and nothing came up. However if I type MyTest.HW it works and returns the value I put in to test with
So my problem is how do I get the Members of ClsLab to show up in VB6?
When I reference the DLL in a VS2010 Project, they show up. But they do not show up in VB6.
Its going to be a very challenging year for me if I cannot get the members of these functions show up in VB6.
Thanks,
-Jeff