Q
Problem solve Get help with specific problems with your technologies, process and projects.

Creating a relationship between control values in two forms

How can I create a relationship between control values in two forms, such as get the combobox.selectedindex from form1 to the textbox.text in form2? If possible, how would you recommend I approach this issue?
It depends on the relationship between the two forms. If form 1 created form 2 then I would use a property on form 2 and set the property before showing the form.

It form 1 and form 2 are created as independent forms, I would use a delegate (event handler) so when form 2 wanted the value from form 1, it could fire an event on form 1 to retrieve the data and/or an event on form 2 could be fired by form 1 when the value changed.

Dig Deeper on Win Development Resources

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

SearchCloudApplications

Close