title: Calling a control in another class
body: <p>I'm trying to add something to Form1's listbox using another class. How do I do that?</p>
  
  <p>This is my current code:</p>
  
  <p>Form1.cs</p>
  
  <pre><code>public partial class Form1 : Form
  {
      public Form1()
      {
          InitializeComponent();
      }
  
      public void writeTest(string items)
      {
          this.listBox1.Items.Add(items);
      }
  }
  </code></pre>
  
  <p>Test.cs</p>
  
  <pre><code>class Test
  {
      Form1 frm1 = new Form1();
  
      public void test()
      {
          frm1.writeTest("Hello");
      }
  }
  </code></pre>