The best approach is probably to have an event
A: An event on your 2nd form which you trigger whenever you need to notify
the first form of the new value
public delegate void MyEventHandler(sender object, MyEventArgs args);
public class MyEventArgs : EventArgs
{
public readonly string NewValue;
public MyEventArgs(string newValue)
{
NewValue = newValue;
}
}
public class Form2 : Form
{
....etc.....
public event MyEventHandler MyEvent;
protected void OnMyEvent(string newValue)
{
if (MyEvent != null)
MyEvent(this, new MyEventArgs(newValue));
}
}
When you create the 2nd form you do this....
var f2 = new Form2();
f2.MyEvent += (sender, args) => TextBox1.Text = args.NewValue;
f2.Show();
Pete