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. Managed C++/CLI
  4. How to call a method on another form

How to call a method on another form

Scheduled Pinned Locked Moved Managed C++/CLI
helpc++tutorialquestion
5 Posts 2 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
    KlaasVersteeg
    wrote on last edited by
    #1

    Hi, I'm quite new to C++/CLI and ran into a problem. I'm trying to get data from some textboxes on a form, for use in another source file. I think the best way to do this is to make a method in the form code which gets the textbox data and passes is to the source file when called. However, somehow I cannot get this working. Can anyone maybe point me in the right direction? Any help would be great!

    A 1 Reply Last reply
    0
    • K KlaasVersteeg

      Hi, I'm quite new to C++/CLI and ran into a problem. I'm trying to get data from some textboxes on a form, for use in another source file. I think the best way to do this is to make a method in the form code which gets the textbox data and passes is to the source file when called. However, somehow I cannot get this working. Can anyone maybe point me in the right direction? Any help would be great!

      A Offline
      A Offline
      Andreoli Carlo
      wrote on last edited by
      #2

      is there some reletion between the first form and the second form.... do the first form generate the second form or the second form generate the first?

      K 1 Reply Last reply
      0
      • A Andreoli Carlo

        is there some reletion between the first form and the second form.... do the first form generate the second form or the second form generate the first?

        K Offline
        K Offline
        KlaasVersteeg
        wrote on last edited by
        #3

        Actually the code in which the data from the form is needed is no form itself. There is no relation between the form and the source file in which the data from the form is to be used. I hope this makes it clear.

        A 1 Reply Last reply
        0
        • K KlaasVersteeg

          Actually the code in which the data from the form is needed is no form itself. There is no relation between the form and the source file in which the data from the form is to be used. I hope this makes it clear.

          A Offline
          A Offline
          Andreoli Carlo
          wrote on last edited by
          #4

          google for this....and you'll find the solution [DllImport("user32.dll")] extern IntPtr FindWindow(String^ lpClassName, String^ lpWindowName); once you have the pointer to the data's form, you have several way to get the data

          K 1 Reply Last reply
          0
          • A Andreoli Carlo

            google for this....and you'll find the solution [DllImport("user32.dll")] extern IntPtr FindWindow(String^ lpClassName, String^ lpWindowName); once you have the pointer to the data's form, you have several way to get the data

            K Offline
            K Offline
            KlaasVersteeg
            wrote on last edited by
            #5

            I'll have a go with that at Google. Thanks for your help!

            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