Qualifying a .NET object in VB6

F

franzdawg3

I have recently re-written a reference library that I'm guessing was
previously written in either VB6 or C into VB.NET. My goal in doing
this was to be able to just switch my references in my VB6 app from
the old .dll to the new .NET object and then all the syntax would
remain the same.

Example:

Dim MyArray as CustomArray

result = CustomArray.Function

Well the problem is that now that I've created this .NET dll I have to
qualify everything which kind of sucks but I understand why it is
this way. IE:

Dim MyArray as MyNewLibrary.CustomArray

Is there any way that I can modify my .NET class library so that I can
just refer to it from VB6 as CustomArray?

Thanks,

Kris
 
G

Guest

(e-mail address removed) wrote in @h2g2000hsg.googlegroups.com:
Is there any way that I can modify my .NET class library so that I can
just refer to it from VB6 as CustomArray?

Have you tried: Imports YourNameSpace Here?
 
F

franzdawg3

(e-mail address removed) wrote in @h2g2000hsg.googlegroups.com:




Have you tried: Imports YourNameSpace Here?

I have checked out some documentation on the Imports keyword but I'm
not sure how I can utilize this in order to accomplish what I would
like. Basically this project is setup as a Class Library compile with
COM Interop and a single class inside. Ideally I want to be able to
instantiate this class without having to reference the library from
WITHIN VB6. Can I accomplish this with Imports and if so, could
someone provide an example in the context of what I provided earlier?

Thanks,

Kris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top