title: How to display data received from serial port in a textbox without the text disappearing in Visual Studio C#?
body: <p>So, I'm trying to develop a simple application in visual C# which gets data from serial port and displays it in a textbox (to monitor temperature). I'm acquiring and displaying the data successfully, using the DataReceived event to update a global string variable and a timer to update the text field on my text box, as shown:</p>
  
  <pre><code>    private void port_DataReceived_1(object sender, SerialDataReceivedEventArgs e)
      {
          try
          {
              globalVar.updateTemp = port.ReadLine(); //This is my global string
          }
          catch (IOException)
          {
          }
          catch (InvalidOperationException)
          {
          }
          catch (TimeoutException)
          {
          }
      }
  
      private void timer1_Tick(object sender, EventArgs e)
      {
          tempDisplayBox.Text = globalVar.updateTemp; //This is my textbox updating
      }
  </code></pre>
  
  <p>The only issue I have is that the value shown in the textbox keeps flashing, making it hard to read. My timer is set to trigger every 10 ms (which should be fast enough, right?). Is there any way to make it more stable? I realize this may be a newb question, but to be fair I am a newb :) Any help is appreciated! Thanks!</p>