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. get controls inside a form in a Multi form application

get controls inside a form in a Multi form application

Scheduled Pinned Locked Moved C#
helptutorial
4 Posts 3 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.
  • K Offline
    K Offline
    Kariem Soudy
    wrote on last edited by
    #1

    can anyone help me in this, i have a multi form app. , i have many open forms, all of the same type(say MyForm) i want to get the text of a textbox inside each open forms) as well as many info, including the position of the form can anyone tell me how to do it thnx in advance

    Web Developer @ Silverkey Egypt

    D D 2 Replies Last reply
    0
    • K Kariem Soudy

      can anyone help me in this, i have a multi form app. , i have many open forms, all of the same type(say MyForm) i want to get the text of a textbox inside each open forms) as well as many info, including the position of the form can anyone tell me how to do it thnx in advance

      Web Developer @ Silverkey Egypt

      D Offline
      D Offline
      DaveyM69
      wrote on last edited by
      #2

      Maybe add each form to a collection as you instanciate them, then iterate through the collection.

      Dave

      1 Reply Last reply
      0
      • K Kariem Soudy

        can anyone help me in this, i have a multi form app. , i have many open forms, all of the same type(say MyForm) i want to get the text of a textbox inside each open forms) as well as many info, including the position of the form can anyone tell me how to do it thnx in advance

        Web Developer @ Silverkey Egypt

        D Offline
        D Offline
        darkelv
        wrote on last edited by
        #3

        1. If it's MDI, you can get the open forms in MDIChildren. 2. If it's not, you can get the open forms in Application.OpenForms. Expose a get-only string property from MyForm, which return the text box's Text property. Get all the open forms from 1 or 2, check whether it's type of MyForm, cast the form to MyForm and access the exposed property.

        K 1 Reply Last reply
        0
        • D darkelv

          1. If it's MDI, you can get the open forms in MDIChildren. 2. If it's not, you can get the open forms in Application.OpenForms. Expose a get-only string property from MyForm, which return the text box's Text property. Get all the open forms from 1 or 2, check whether it's type of MyForm, cast the form to MyForm and access the exposed property.

          K Offline
          K Offline
          Kariem Soudy
          wrote on last edited by
          #4

          thanks you very much, will try that

          Web Developer @ Silverkey Egypt

          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