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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Passing Data between Forms ???

Passing Data between Forms ???

Scheduled Pinned Locked Moved Managed C++/CLI
questioncsharp
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.
  • B Offline
    B Offline
    Badboy22TR
    wrote on last edited by
    #1

    Hi, I have 2 forms (Form A, Form B). One of them is Parent(Form A), the other one is Child(Form B). Child form has textboxes which users can input smtg. I want to transfer data from Child Form's textboxes to Parent form textboxes. How can i do this ? I found some articles about Delegates but all in C#, i tried to convert them in VC ++ but everytime i had some errors. I tried to declare a delegate in Form A like: public ref class Randevu2 : public System::Windows::Forms::Form { public: R2(void) { InitializeComponent(); // //TODO: Add the constructor code here // } public delegate void DelDeneme(String^ s1, String^ s2); But everytime i had errors. Can any one suggest something or tell me that where i declare delegates?

    L 1 Reply Last reply
    0
    • B Badboy22TR

      Hi, I have 2 forms (Form A, Form B). One of them is Parent(Form A), the other one is Child(Form B). Child form has textboxes which users can input smtg. I want to transfer data from Child Form's textboxes to Parent form textboxes. How can i do this ? I found some articles about Delegates but all in C#, i tried to convert them in VC ++ but everytime i had some errors. I tried to declare a delegate in Form A like: public ref class Randevu2 : public System::Windows::Forms::Form { public: R2(void) { InitializeComponent(); // //TODO: Add the constructor code here // } public delegate void DelDeneme(String^ s1, String^ s2); But everytime i had errors. Can any one suggest something or tell me that where i declare delegates?

      L Offline
      L Offline
      led mike
      wrote on last edited by
      #2

      Badboy22TR wrote:

      I want to transfer data from Child Form's textboxes to Parent form textboxes. How can i do this ?

      One approach is you can learn about Design and Patterns like Model-View-Controller. Another approach that most people around here do is expose the controls as public properties and just set/get the data from one to the other whenever you like, that way they are tightly coupled so that when you want to change something later it's a big mess.

      Badboy22TR wrote:

      Can any one suggest something or tell me that where i declare delegates?

      Have you looked at the C++/CLI Beginner articles here on code project? They are highly recommended.

      led mike

      A 1 Reply Last reply
      0
      • L led mike

        Badboy22TR wrote:

        I want to transfer data from Child Form's textboxes to Parent form textboxes. How can i do this ?

        One approach is you can learn about Design and Patterns like Model-View-Controller. Another approach that most people around here do is expose the controls as public properties and just set/get the data from one to the other whenever you like, that way they are tightly coupled so that when you want to change something later it's a big mess.

        Badboy22TR wrote:

        Can any one suggest something or tell me that where i declare delegates?

        Have you looked at the C++/CLI Beginner articles here on code project? They are highly recommended.

        led mike

        A Offline
        A Offline
        azigreci
        wrote on last edited by
        #3

        MVC to pass data between forms??? :laugh: you will never understand this....

        L 1 Reply Last reply
        0
        • A azigreci

          MVC to pass data between forms??? :laugh: you will never understand this....

          L Offline
          L Offline
          led mike
          wrote on last edited by
          #4

          led mike

          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