Get class members from library

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FishVal
    Recognized Expert Specialist
    • Jun 2007
    • 2656

    Get class members from library

    Hello, ladies and gentlemen.

    I've got an idea of a somewhat ambitious project. The main purpose is to instantiate objects and set their properties / fill collections with data stored in database. Another main :) purpose to design a series of GUI tools like Access form/report designer, of course much more simple and humble.
    Right now I'm going to design a tool for Office.CommanBa r and related classes. They have a bunch of properties and hardcoding them seems to be a dull, ineffective and inflexible solution so I consider it will be a good and useful launch pad.
    The key issue here is how to get available properties and enumerations of class. Sure, I could manually create a list and store it in tables, but I'd certainly prefer get it from primary source - library file. Does anybody have an idea of how it could be done?

    Thanks in advance,
    Fish
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32645

    #2
    Will the Object Browser (F2 in VBA Window) not do this for you Fish?

    PS. Good luck with your project :)

    Comment

    • FishVal
      Recognized Expert Specialist
      • Jun 2007
      • 2656

      #3
      Originally posted by NeoPa
      Will the Object Browser (F2 in VBA Window) not do this for you Fish?

      PS. Good luck with your project :)
      Not really, NeoPa.

      The purpose is to get class definitions programmaticall y to populate some control (TreeView I think) on "object design form" to reflect class properties so providing an interface to set property values and to store them in database. Then, when an object of the class will be created, its properties will be set using these values.
      My dillema is whether I should store class definitions in table as independant list or should I get it from library which is certainly requires more sophisticated coding but deals with primary source and opens a way for code universalizatio n.

      Comment

      • FishVal
        Recognized Expert Specialist
        • Jun 2007
        • 2656

        #4
        Seems I've found it. "Typelib Information Library" (tlbinf32.dll) provides all necessary functionality.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32645

          #5
          I'd be interested to hear how this is used Fish.

          BTW I love your tidy thinking. Definitely go to the source if possible.

          Comment

          • FishVal
            Recognized Expert Specialist
            • Jun 2007
            • 2656

            #6
            Originally posted by NeoPa
            I'd be interested to hear how this is used Fish.
            Well. As yet I'm exploring TLI object model. I've downloaded help file. Suprisingly unlike most of MS technical documents it appeared to be quite rich of content.
            tlbinf32.dll is not a common part of win installation, usually it comes with Visual Studio package. As well it may be freely downloaded and registered.

            Comment

            Working...