PDA

Click to See Complete Forum and Search --> : list functions of Class


FastCode
Mar 8th, 2002, 07:02 AM
I have a class module with 6 let/get properties.
Can I list a names of that properties at run time with my program? I need a values of properties of some class at run time

For example:
for i = 1 to numberofproperties
x(i) = myClass...value of i property
next i

jim mcnamara
Mar 8th, 2002, 07:45 AM
If the class module is created in VB and is a separate piece of code (dll, OCx, etc), then the

Class.Properties

collection enumerates the properties.

FastCode
Mar 11th, 2002, 02:39 AM
But, I need to list properties of some class.

I dont know the name of the property.

Edneeis
Mar 11th, 2002, 02:55 AM
Sorry but I don't think classes have any Properties collection to enum (I could be wrong). Unless you set up your props in a way to enum them.

FastCode
Mar 11th, 2002, 09:56 AM
There must be a way to do that.
When we include some dll or ocx in VB at design time, VB Editor "read" all properties and write that on Properties window, or when we write a code and write a "." there is shown list of properties and methods of that class.
Is it right?
But I dont know how :rolleyes:

Edneeis
Mar 11th, 2002, 10:16 AM
You can get that information by using the TypeLib Information ovject but that does mean there is a way to loop through like:
MyObj.Properties(1).value=?