In Form2:
public Color NewColor { get { return _newColor; } }
private Color _newColor;
This variable is set within the dialog, by the end user selecting a color. Actually, there's a color dialog built in to Windows, are you using that, or how is a color being selected ?
In Form1
Form2 dlg = new Form2;
if (DialogResult.OK == dlg.ShowDialog()) { this.theButton.BackColor = dlg.NewColor; }
I'm going from memory, the property may not be called BackColor, but that's the general idea.
|