title: Is there a way to prioritize an object on a form?
body: <p>I have a form where there is a timer in the corner that counts to 10 repeatedly. The "Next" button below triggers a reading that the user is taking every few seconds. When I hit the "Next" button the UI freezes while data is being taken and that includes the textbox that the timer is writing to. So the visible number that the user sees is frozen for 2 seconds every time they press the button. Is there a way to keep the text box being updated every second? </p>
  
  <p>Here is the tick event:</p>
  
  <pre><code>private void timer_Counter_Tick(object sender, EventArgs e)
  {
      if (Ticker == 9)
      {
          Ticker = 0;
      }
      else { Ticker++; }
      txtbx_Timer.Text = Ticker.ToString();
  }
  </code></pre>
  
  <p>and here is the timer initiation:</p>
  
  <pre><code>timer_Counter = new System.Windows.Forms.Timer();
  timer_Counter.Tick += new EventHandler(timer_Counter_Tick);
  timer_Counter.Interval = 1000;
  timer_Counter.Start();
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/qBTCz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qBTCz.png" alt="enter image description here"></a></p>