public static void AppendText(TextBoxBase tb, string text)
 {
     if (tb == null)
     {
         return;
     }
     tb.SuspendLayout();
     if (tb.InvokeRequired)
     {
         tb.Invoke(new AppendTextDelegate(AppendText), new object[] { tb, text });
     }
     else
     {
         tb.SelectionStart = tb.TextLength;
         tb.SelectedText   = text;
     }
     tb.ResumeLayout();
 }