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 / C++ / MFC
  4. 2 forms link between label and textbox

2 forms link between label and textbox

Scheduled Pinned Locked Moved C / C++ / MFC
help
9 Posts 4 Posters 1 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.
  • J Offline
    J Offline
    jamesmc1535
    wrote on last edited by
    #1

    hi , i want to show the text typed in textbox(form 1) shown on label(form 2) heres my code : label2.Text = txtUser.text; i get a error textbox8 does not exist in current context

    D 1 Reply Last reply
    0
    • J jamesmc1535

      hi , i want to show the text typed in textbox(form 1) shown on label(form 2) heres my code : label2.Text = txtUser.text; i get a error textbox8 does not exist in current context

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      Okay, and? :confused: :rolleyes: [edit] This looks like VB, .Net, or Unmanaged code. Regardless, you are in the wrong forum. [/edit]

      "One man's wage rise is another man's price increase." - Harold Wilson

      "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

      "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

      J 2 Replies Last reply
      0
      • D David Crow

        Okay, and? :confused: :rolleyes: [edit] This looks like VB, .Net, or Unmanaged code. Regardless, you are in the wrong forum. [/edit]

        "One man's wage rise is another man's price increase." - Harold Wilson

        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

        J Offline
        J Offline
        jamesmc1535
        wrote on last edited by
        #3

        and i get a error :laugh:

        D 1 Reply Last reply
        0
        • D David Crow

          Okay, and? :confused: :rolleyes: [edit] This looks like VB, .Net, or Unmanaged code. Regardless, you are in the wrong forum. [/edit]

          "One man's wage rise is another man's price increase." - Harold Wilson

          "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

          "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

          J Offline
          J Offline
          jamesmc1535
          wrote on last edited by
          #4

          sorry i only see now that i didnt finish it :-\ :-\ uhm i get a (textbox8) login form not part of current .....

          Richard Andrew x64R 1 Reply Last reply
          0
          • J jamesmc1535

            and i get a error :laugh:

            D Offline
            D Offline
            David Crow
            wrote on last edited by
            #5

            Congratulations. Since you do not offer anything about that error, and my ESP is down for maintenance, I guess my work here is done.

            "One man's wage rise is another man's price increase." - Harold Wilson

            "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

            "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

            J 1 Reply Last reply
            0
            • D David Crow

              Congratulations. Since you do not offer anything about that error, and my ESP is down for maintenance, I guess my work here is done.

              "One man's wage rise is another man's price increase." - Harold Wilson

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

              J Offline
              J Offline
              jamesmc1535
              wrote on last edited by
              #6

              i only saw now that i havent finished it, i sent you a reply but seems like it didnt go thru , i get a (textbox8)login form does not exist in current context

              1 Reply Last reply
              0
              • J jamesmc1535

                sorry i only see now that i didnt finish it :-\ :-\ uhm i get a (textbox8) login form not part of current .....

                Richard Andrew x64R Offline
                Richard Andrew x64R Offline
                Richard Andrew x64
                wrote on last edited by
                #7

                You can't directly refer to controls on another Form from within a Form. You must expose a method or property on the other Form by which to retrieve the value of the control.

                The difficult we do right away... ...the impossible takes slightly longer.

                J 1 Reply Last reply
                0
                • Richard Andrew x64R Richard Andrew x64

                  You can't directly refer to controls on another Form from within a Form. You must expose a method or property on the other Form by which to retrieve the value of the control.

                  The difficult we do right away... ...the impossible takes slightly longer.

                  J Offline
                  J Offline
                  jamesmc1535
                  wrote on last edited by
                  #8

                  ok makes sense , how do i do that ;P ;P public form 1

                  L 1 Reply Last reply
                  0
                  • J jamesmc1535

                    ok makes sense , how do i do that ;P ;P public form 1

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    Go back to your study guides and learn how to expose properties of your class objects.

                    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