//设置为后台线程 Thread th = new Thread(delegate() { append(); }); th.IsBackground = true; th.Start(); //在append方法里面需要调用前台控件 public void append(){ // ... 业务处理 this.Invoke(new flushMessage(showMessage), new object[] { row["Code"].ToString(), res }); } //委托flushMessage和方法showMessage签名必须一致 private delegate void flushMessage(String id, String res); private void showMessage(String id,String res) { if (res == "true") { txtMsg.Text += " " + id + " 导入成功 "; } else { txtMsg.Text += " " + id + " 导入失败 "; } }