txtBxMsg.BeginInvoke((MethodInvoker)delegate
{
if (txtBxMsg.Text.Length > 10000)
txtBxMsg.Text = txtBxMsg.Text.Substring(txtBxMsg.Text.Length - 10000);
txtBxMsg.AppendText( "\r\n" + AMsg);
txtBxMsg.ScrollToCaret();
});
原文:https://www.cnblogs.com/percent10/p/11809055.html