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. How can I get the text of the textbox which layout in another form?

How can I get the text of the textbox which layout in another form?

Scheduled Pinned Locked Moved C#
question
4 Posts 4 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.
  • U Offline
    U Offline
    User 1872386
    wrote on last edited by
    #1

    please...

    Z S M 3 Replies Last reply
    0
    • U User 1872386

      please...

      Z Offline
      Z Offline
      zadeveloper com
      wrote on last edited by
      #2

      If the textbox resides in another application use the GetwindowText API. If the textbox resides in your application create a public readonly property with returns TextBox.Text; Programming is a way of thinking ... its a way of life. Some people have it and some people don't. Well at least thats what the voices in my head tell me. :)

      1 Reply Last reply
      0
      • U User 1872386

        please...

        S Offline
        S Offline
        shafqaat
        wrote on last edited by
        #3

        Create The object of that form on which textbox residea.Than with the help of that object u can access every control which is placed on that form.

        1 Reply Last reply
        0
        • U User 1872386

          please...

          M Offline
          M Offline
          Mohamad Al Husseiny
          wrote on last edited by
          #4

          as above reply said you can use somthing like that

          Form2 form= new Form2();
          string text=form2.textBox1.Text;
          

          MCAD

          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