代码如下:
private void ShowInfo(string msg) { this.BeginInvoke((Action)(() => { textBox1.AppendText(string.Format("{0} {1}", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), msg)); textBox1.AppendText(Environment.NewLine); textBox1.ScrollToCaret(); })); }
原文地址:https://www.cnblogs.com/liangxiarong/p/10188215.html
时间: 2024-10-13 00:13:41