Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Cycling through all GUI Objects within a form

Cycling through all GUI Objects within a form

Scheduled Pinned Locked Moved C#
csharptutorialquestion
24 Posts 11 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Dave Kreskowiak

    Whould you mind explaining yourself?? Undefeated's explanation and suggestion is perfectly valid.

    A guide to posting questions on CodeProject[^]
    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
         2006, 2007

    D Offline
    D Offline
    Dan Neely
    wrote on last edited by
    #21

    but it wasn't something that could be copy/pasted as is to do the OPs homework/job for him. Consequently it was worthless. :mad:

    -- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.

    1 Reply Last reply
    0
    • K karoitay

      I Have just recently heard about reflection and I'm quite not familiar with the subject. So... can you please hand me a little piece of code to show how can this be done so I will not have to read all about reflection. ( I'm a litle busy the next days any I need this job to be done as quickly as possible ). Thanks.

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #22

      karoitay wrote:

      I'm a litle busy the next days any I need this job to be done as quickly as possible

      Gee, why didn't you say so. I'll get right on it. :rolleyes:

      --- How to get answers to your questions[^]

      1 Reply Last reply
      0
      • K karoitay

        I Have just recently heard about reflection and I'm quite not familiar with the subject. So... can you please hand me a little piece of code to show how can this be done so I will not have to read all about reflection. ( I'm a litle busy the next days any I need this job to be done as quickly as possible ). Thanks.

        C Offline
        C Offline
        Colin Angus Mackay
        wrote on last edited by
        #23

        You can ask every object for its type with .GetType(). You get back a Type object. It has methods on it such as GetMethod, GetProperty and so on. You can get information from the objects those methods return MethodInfo or PropertyInfo and so on. If you find the one you want you can then Invoke it. Most of this should make enough sense through intellisense. You may have to look up some stuff in the documentation though. It really is worth reading up on so you have a better understanding of the environment in which you are working.


        Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

        K 1 Reply Last reply
        0
        • C Colin Angus Mackay

          You can ask every object for its type with .GetType(). You get back a Type object. It has methods on it such as GetMethod, GetProperty and so on. You can get information from the objects those methods return MethodInfo or PropertyInfo and so on. If you find the one you want you can then Invoke it. Most of this should make enough sense through intellisense. You may have to look up some stuff in the documentation though. It really is worth reading up on so you have a better understanding of the environment in which you are working.


          Upcoming FREE developer events: * Glasgow: db4o: An Embeddable Database Engine for Object-Oriented Environments, Mock Objects, SQL Server CLR Integration, Reporting Services ... My website

          K Offline
          K Offline
          karoitay
          wrote on last edited by
          #24

          Thanks, I'll check it out.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups