Get list of all user controls

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kto
    New Member
    • Sep 2007
    • 6

    Get list of all user controls

    Is there any way to get a list of all user controls (these are not controls on a form) within a project so that they can be looped through for any purposes? VB Express 2005/WinXP

    Thanks in advance.
  • TRScheel
    Recognized Expert Contributor
    • Apr 2007
    • 638

    #2
    Originally posted by kto
    Is there any way to get a list of all user controls (these are not controls on a form) within a project so that they can be looped through for any purposes? VB Express 2005/WinXP

    Thanks in advance.
    Use reflection, iterate through each object, and see if the inheret from Controls

    Comment

    • kto
      New Member
      • Sep 2007
      • 6

      #3
      Originally posted by TRScheel
      Use reflection, iterate through each object, and see if the inheret from Controls
      Can you please give some samples? Reflection is totally new to me. Thanks

      Comment

      • TRScheel
        Recognized Expert Contributor
        • Apr 2007
        • 638

        #4
        A little overkill, but this will explain it in detail:

        Information on Reflection

        Comment

        Working...