teluguvadu
asked on
How to get the Properties of any Object at Runtime?
I would like to know how to get a list of exposed public properties of a given object at runtime and probably have a list of them in any form, as a collection or as an array...any thing.
Well you can not have an array of all the properties of an object. All what you can do is save the properties of a certain object one by one to User Defined Type variable or declare a variable as the object.
eg:
Dim MyObject as Form 'MyObject will be a Form Type variable
then you can assign this variable to your form
MyObject=form1 'THis will save all the needed property of form1 in MyObject
I hope that answer your quesiton
eg:
Dim MyObject as Form 'MyObject will be a Form Type variable
then you can assign this variable to your form
MyObject=form1 'THis will save all the needed property of form1 in MyObject
I hope that answer your quesiton
that way you will not know the properties of an unknown automatation object, and in order to do that you must go deep into COM
Have what you need. Just found it in the last two days. Send me your e-mail address and I will send the info to you. (Have to find out where I saved it in the mean time).
stingray@canada.com
stingray@canada.com
ASKER
Yes, What Khaledc has proposed does'nt help. I guess PedroG has some suggestions and it looks likes stingray too is thinking in the same lines.
stingray,
can you please post your code so that all (other) experts can take a look at it???
thanks
vmano
can you please post your code so that all (other) experts can take a look at it???
thanks
vmano
ASKER
The code stingray suggested does'nt help me. I am sorry if it has dampened the urgency.
Thanks
Teluguvadu
Thanks
Teluguvadu
Teluguvado, you must serch to find how to query the object for its interface, i know it has something to do with the implementation of the IUknown interface.
I'm sory i can't help you right now cos i'm with no free time, i will check this in a few days if still now answer i will search to try and find one
I'm sory i can't help you right now cos i'm with no free time, i will check this in a few days if still now answer i will search to try and find one
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER