|
-
Mar 8th, 2002, 08:02 AM
#1
Thread Starter
Junior Member
list functions of Class
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
-
Mar 8th, 2002, 08:45 AM
#2
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.
-
Mar 11th, 2002, 03:39 AM
#3
Thread Starter
Junior Member
But, I need to list properties of some class.
I dont know the name of the property.
-
Mar 11th, 2002, 03:55 AM
#4
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.
-
Mar 11th, 2002, 10:56 AM
#5
Thread Starter
Junior Member
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
-
Mar 11th, 2002, 11:16 AM
#6
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=?
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
|