//主线程 public delegate void UpdateMessage(string mes); public void UpdatePortMessage(string mes) { this.txtMessage.AppendText(string.Format("Connected {0}. succeed", mes) + "\r\n"); this.txtClientIP.Text = mes; } // 线程1 UpdateMessage upPort = new UpdateMessage(UpdatePortMessage); this.BeginInvoke(upPort, point);
http://bbs.csdn.net/topics/390535667