private void button1_Click(object sender, EventArgs e) { if (button2.BackColor == Color.Red) { button2.BackColor = Color.Green; } else { button2.BackColor = Color.Red; } }