Getting the properties of VB class at runtime 
Author Message
 Getting the properties of VB class at runtime

Hi to all!

Is there a way to enumerate the properties of VB class at runtime?

Thanks in advance,

Eli.



Fri, 31 May 2002 03:00:00 GMT  
 Getting the properties of VB class at runtime
You would need a type library (TLB) exposing the IDispatch interface.   You
would then point an IDispatch reference pointer to your object and use it's
methods.  I don't have any example code (in VB) for this. Does anyone else
have any??

Here is a link about IDspatch...
http://msdn.microsoft.com/isapi/msdnlib2.idc?theURL=/library/psdk/aut...
ap5_5t9v.htm


Quote:
> Hi to all!

> Is there a way to enumerate the properties of VB class at runtime?

> Thanks in advance,

> Eli.



Fri, 31 May 2002 03:00:00 GMT  
 Getting the properties of VB class at runtime

Quote:
>Is there a way to enumerate the properties of VB class at runtime?

Eli,

If it's a public class, you should be able to use the Typelib
Information library (tlbinf32.dll) to do it. Add a reference to it,
and download the documentation from

http://msdn.microsoft.com/vbasic/downloads/download.asp?ID=094

Mattias

________________________________________________
Mattias "beezo" Sj?gren, MCP

http://home1.2.sbbs.se/mattias.sjogren/sw/
Please send questions/replies to the newsgroups



Fri, 31 May 2002 03:00:00 GMT  
 Getting the properties of VB class at runtime
Using TLBINF32.DLL works fine in the VBIDE, but gives unpredictable results
when compiled.  This is due to the fact that it was "designed to be used
only in the IDE" (MS words)


Quote:
> >Is there a way to enumerate the properties of VB class at runtime?

> Eli,

> If it's a public class, you should be able to use the Typelib
> Information library (tlbinf32.dll) to do it. Add a reference to it,
> and download the documentation from

> http://msdn.microsoft.com/vbasic/downloads/download.asp?ID=094

> Mattias

> ________________________________________________
> Mattias "beezo" Sj?gren, MCP

> http://home1.2.sbbs.se/mattias.sjogren/sw/
> Please send questions/replies to the newsgroups



Fri, 31 May 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Retrieve name of Function, Sub, Class, Property etc from within that item during runtime

2. Classes : how to create properties at runtime ????

3. Problem getting Application class properties

4. VB2008: Getting the System.Reflection.PropertyInfo from within a class property

5. Not getting Events from classes within classes.

6. Exposing Properties collection in custom classes as many MS Classes do

7. Exposing a Properties collection in custom classes as many MS Classes do

8. Properties Property for a Custom Class

9. Can a class property have properties?

10. Can a class property have properties?

11. C++ static class property possible in VB ?

12. Setting Crystal Reports Properties during Runtime Problem in VB

 

 
Powered by phpBB® Forum Software