passing information from a child form to parent method

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HaLo2FrEeEk
    Contributor
    • Feb 2007
    • 404

    #1

    passing information from a child form to parent method

    Edit: please read the reply.
  • HaLo2FrEeEk
    Contributor
    • Feb 2007
    • 404

    #2
    Ok, upon messing around with it a little more I was able to get a child form added the regular way, Project > Add Windows Form. I got a reference to Form2 (renamed to loginForm) in my main class. I can show and hide the child form...but I stil can NOT find a way to pass information from loginForm back to Form1...can someone PLEASE help me out!!!

    I've tried:

    get {return this.username.t ext; }

    but I get errors like "the name 'get' does not exist in the current context" and "; expected."

    Basically I have 2 textboxes; One for username and one for password, and a button, for logging in. I need it so that when I click the login button in loginForm it sends the data from the textboxes back to the main form for processing.

    Comment

    • ThatThatGuy
      Recognized Expert Contributor
      • Jul 2009
      • 453

      #3
      hey halo2 freeeek ..... i have answered this question before to someone....
      here's a link to that post plz refer to my reply in that post and you'll get your answer

      Comment

      • HaLo2FrEeEk
        Contributor
        • Feb 2007
        • 404

        #4
        Sounds like a good solution, I'll try it out and see what I get. Thanks for the speedy reply!

        Comment

        Working...