public void MsgWrite(string msg) { if (TB_OUTPUT.InvokeRequired) { TB_OUTPUT.BeginInvoke(new Action(() => { TB_OUTPUT.AppendText(msg); TB_OUTPUT.AppendText(Environment.NewLine); })); } else { TB_OUTPUT.AppendText(msg); TB_OUTPUT.AppendText(Environment.NewLine); } }