-
November 15th, 2005, 01:00 PM
#1
Use .net dll in VB6?
I want use a .net dll in vb6. I have selected "Register for COM Interop" in VS.net proyect. I have registered dll with resgam. I have generated .tlb file. I have add in references tlb file. But when I run it tak error "File or asembly name xxxx , or one of its components, was not found".
Before register with resgam the error was "ActiveX component can't create object".
Do you know how use .net dlls in vb6?
Thanks
_______________
Hip Hop
Foro heavy
-
November 16th, 2005, 02:40 AM
#2
Re: Use .net dll in VB6?
Take a look at this tutorial http://msdn.microsoft.com/library/de...ertutorial.asp. This might help a bit in understanding how COM interop actually works. This is in C# but should be helpful in this case.
-
November 16th, 2005, 04:39 AM
#3
Re: Use .net dll in VB6?
Thanks I have solve it.
But now I have another problem, when I write "object." it don't shome the public methods of the class (after write dot).
If I write method it runs ok, but can I show the methods of the class when I write dot after de object?
Thanksss
-
November 16th, 2005, 05:05 AM
#4
Re: Use .net dll in VB6?
Originally Posted by wakeup
Thanks I have solve it.
But now I have another problem, when I write "object." it don't shome the public methods of the class (after write dot).
If I write method it runs ok, but can I show the methods of the class when I write dot after de object?
Thanksss
This is because you are use Late Binding. Late Binding means that compiler will only come to know about the actual ActiveX at run-time. This is the reason why inteli-sense of VB doesn't work when you declare objects using generic object class.
-
November 16th, 2005, 06:02 AM
#5
Re: Use .net dll in VB6?
How can I solve it?
thanks
-
November 16th, 2005, 06:51 AM
#6
Re: Use .net dll in VB6?
Originally Posted by wakeup
How can I solve it?
thanks
You will have to use Early-Binding. I would declare my object like this to
Code:
Dim myObject As New NetObjectClass
Where NetObjectClass is the names of the Class you created in .NET.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|