/* * protected override CreateParams CreateParams * { * get * { * CreateParams cp = base.CreateParams; * cp.ExStyle |= 0x02000000; // Turn on WS_EX_COMPOSITED * return cp; * } * } */ public void Add(string text) { if (InvokeRequired) { BeginInvoke(new Action <string>(Add), text); } else { if (!string.IsNullOrEmpty(text)) { text = text.Replace('\r', '\n'); TB.Text += text; TB.SelectionStart = TB.Text.Length; TB.ScrollToCaret(); if (m_File != null) { m_File.Write(text); } } } }