This might be a novice question. :). Consider the following scenario.
- Suppose we have two windows forms that are already “loaded” (i.e You
can see both the forms)- Form 1 contains a textbox and a “submit” button while the form 2
contains a text lable.- The user can enter a string in the textbox and press submit on
form 1 The lable on form 2 should
be updated with the new text.
What is the best way to achive this? Any formal way to do this? I don’t want to increase the variable scopes unnecessarily.
Edit : Both the forms belong to same application
Assuming these forms are part of the same application, you need to have a common data model where you keep your data and then your forms “bind” to this data model. Check out M-V-C or M-V-VM patterns. This would also nicely separate your UI from your data.