Hmm not exactly what I'm looking for. I just want to do the following from vbs. Can I use the enum's of the class or do I have to create a set of constants that mimic the enums?
Example
' This is the construct of the sample dll
public class myclass
public enum tooltype
hammer=0
axe=1...
Hello,
The for each instruction? No sure I follow. I have a class from vb.net that has an enumeration. Some of the properties in the class type their accessors against the enumeration. A com wrapper has been added to the class to make it accessible from vbs. Now with those properties low can I...
What is the technique for accessing enum's from object that are late bound? Do you have use the equivalent number or is their some way to access the enums? I could also create constants representing the enum's and their vals. How are you doing this?
Thanks,
Glenn
Hello,
I tested the namespace theory. I doesn't work as expected.
Baically when you create a vb6 object the dot namespace does not display in intellisense. I tried just coding it thinking that it may just not expose the interface, still nothing.
Interesting that nested classes display at...
And you say you don't have to create an inteface to instantiate a class from vb6. Hmm, what am I doing wrong? If I don't create and interface vb6 complains that the type is not defined. Any when I try to access the propertys and methods etc. none list with intellisense. But I create an interface...
Now how would this change the declaraton in vb6? How does vb6 interpret namespaces? Also when you create a class from .net and then try to define an object based on that class from VB6 is it a requirement to create an interface. Without an interface vb6 won't let me create the object. Try this...
Hello
How would creating a namespace provide a solution? Can you give me an example of what your suggesting. The only option to me is to flatten the structure of the class so that it has no nested classes. What's your take?
Thanks,
Glenn
> rick said:
> How are you accessing your .Net assembly from VB6?
I use regasm on the dll then I add reference to the tlb in vb6. Early binding. But there's no reason why you couldn't use createobject with late binding.
dim obj as EnclosingClass.NestedClass
set obj = new...
The trouble i'm having is I can't create objects with nested classes from vb6. Try this, create the following class in VB.NET. Then regasm it and try to create an object based on the nested class from vb6. Then try to declare the following object. I can't. As soon as I run the project it tells...
I've read your response. The trouble i'm having is I can't create objects with nested classes from vb6. Try this, create the following class in vb.net. Then regasm it and try to create an object based on the nested class from vb6. Then try to declare the following. I can't. As soon as I run the...
I'm wanted to consume my vb.net assemblies (dll/tlb) from vb6. I can do this but an interface must be defined for the class. That works. But how do we define interfaces for a class with nested classes?
' Visual Basic
' This is the enclosing class, whose class declaration contains the nested
'...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.