Passing parameters back and forth between form controls

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Martha Amer
    New Member
    • Aug 2010
    • 3

    Passing parameters back and forth between form controls

    Hello,

    I was wondering what would be the most efficient and correct way to have two forms with let's say one text box in each form, when I change the text in the text box in form 1 the text gets updated in runtime in the text box in form 2 and vice versa.

    Thanks,

    Martha
  • Joseph Martell
    Recognized Expert New Member
    • Jan 2010
    • 198

    #2
    As long as they are running in the same application, then I would suggest setting up events and handlers for each form. I think that it is best practice not to expose the controls on one form to the other form, so I would add a new event to each form class and then have each form handle the other's event.

    Bear in mind that what is most correct and efficient depend on the circumstances as well. For example, consistency with the coding in the rest of an application can often affect what is considered "correct".

    Comment

    Working...