The problem is that the ListBox control only exists when Form1 is created. Doing Form1.listBox1 doesn't work because the listBox isn't marked as static.
The best way to do this is to add a property to Form2, called Form1Ref and then give it a reference to the Form1 before you show it:
Code:
//In Form2
private Form1 form1Ref;
public Form1 Form1Ref
{
get { return form1Ref; }
set { form1Ref = value; }
}
Code:
//In Form1
private void ShowForm2()
{
Form2 newForm = new Form2();
newForm.Form1Ref = this;
newForm.Show();
}
Now you can call this.Form1Ref.listBox1 to get access to it.
Regards
Dominic