I want to transfer items from the combo boxes (those in F2 are public) in Form2 to those in Form1. Why' s not working like this?
Form2
Form2
Code:
public partial class Form2 : Form
{
Form1 form1 = new Form1();
...
private void button1_Click(object sender, EventArgs e)
{
form1.comboBox1.Items.Add(this.comboBox1.SelectedItem.ToString());
form1.comboBox2.Items.Add(this.comboBox2.SelectedItem.ToString());
}
}
Comment