title: Update control and refresh form by call from class to main form
body: <p>I want to update text box while doing something in other class. Let me put my code :</p>
  
  <h2>Form1.cs</h2>
  
  <pre><code>namespace TestApp
  {
      public partial class Form1 : Form
      {
          CalledClass call = new CalledClass();
  
          public Form1()
          {
              InitializeComponent();
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              call.Call_UpdateBox();
          }
  
          public void UpdateBox()
          {
              textBox1.Text = "hello";
          }
      }
  }
  </code></pre>
  
  <h2>CalledClass.cs</h2>
  
  <pre><code>namespace TestApp
  {
      class CalledClass
      {
       public void Call_UpdateBox()
          {
              Form1 mainform = new Form1();
  
              //do looping for doing some tasks here and update textbox every time
              mainform.UpdateBox();
          }
      }
  }
  </code></pre>
  
  <p>The Call_UpdateBox function in CalledClass is called when the button on main form is clicked, where I have to do some looping and in between update the textbox in the main form. Though textbox gets updated if i see its value in debug mode, but it reamins blank on main form. Please suggest. Thx in advance.</p>