title: How to add items to a listbox from a different form?
body: <p>I am trying to add a new item to a listbox in form1 from form2. The idea behind it is to end up with a list of different items each being different from each other (or the same, doesnt matter) based on the form2 activity. Say I open form1 (and it has shopping list (listbox))and I open form2 and click button which would add "bannana" to the list in form1. How do I do this? I've tryed various ways such as adding "addToList(parameter)" method in the form1 and then calling it from form2 and passing parameters but the list would remain empty however other things such as message box would pop up etc. So any ideas how to solve this?</p>
  
  <p>I am using this method in form one to add the items into the list and it works:</p>
  
  <pre><code>public void addToList()
  {
      MessageBox.Show("Adding stuff to list");
      listEvent.Items.Add("New item 1");
      listEvent.Items.Add("new item 2");
      MessageBox.Show("Done adding");
      listEvent.Refresh();
  }
  </code></pre>
  
  <p>Now when I try to call it from another class/form I use this:</p>
  
  <pre><code>public void changeForm()
  {
      EventPlanner mainEventForm = new EventPlanner();
      mainEventForm.addToList();
  }
  </code></pre>
  
  <p>Or:</p>
  
  <pre><code>private void btnAddEvent_Click(object sender, EventArgs e)
  {
      EventPlanner mainEventForm = new EventPlanner();
      mainEventForm.addToList();
  }
  </code></pre>
  
  <p>But it still doesnt work. Although when I use it from form1 (eventplanner, where the list is) it works perfectly fine. I even changed access modifyer to public so that shouldnt be the problem.</p>