title: Automatically update label every second
body: <p>So I'm trying to make a clicker game and I've set a timer to the Factory upgrade. The cookies update, but in the background. </p>
  
  <p>The label does not update until you click the <code>Main</code> button (to raise cookie count). I tried <code>CookieCount.Refresh()</code> or <code>Refresh()</code> (<code>CookieCount</code> being the label I want to update every second).</p>
  
  <pre><code>public Form1()
  {
      InitializeComponent();
  
      TRIPLECBTN.Hide();
  
      // Create a timer with a ten second interval.
      aTimer = new System.Timers.Timer(10000);
  
      aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent);
  
      // Set the Interval to 2 seconds (2000 milliseconds).
      aTimer.Interval = 1000;
      aTimer.Enabled = false;
  }
  public void OnTimedEvent(object source, ElapsedEventArgs e)
  {
      cookies = cookies + 1;
  }
  public void button3_Click(object sender, EventArgs e)
  {
      if (cookies &gt;= 1)
      {
          FACTORYBTN.Hide();
          INFO1.Hide();
          COST1.Hide();
          PRICE1.Hide();
          cookies -= 250;
          MessageBox.Show("You have bought Factory!");
          aTimer.Enabled = true;
  
      }
  }
  </code></pre>
  
  <p>(there are some lines in between but they aren't important).</p>