Hi there, I think I understood your problem. So you not only want to open a new form, but you want to change the backcolor of the textbox on the 2nd form. So it means you want to call the 2nd form event within the first form. You can do it as below.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
Form2 frm2 = new Form2();
private void button1_Click(object sender, EventArgs e)
{
frm2.Show();
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.BackColor = Color.Red;
frm2.TextboxBackColor = Color.Red;
frm2.button1_Click(sender, e);
}
}
public partial class Form2 : Form
{
public Color TextboxBackColor { get; set; }
public Form2()
{
InitializeComponent();
}
internal void button1_Click(object sender, EventArgs e)
{
textBox1.BackColor = TextboxBackColor;
}
}