看看下面代码就知道了
void ShowState(string str) { try { TextBox tb = (TextBox)tabControl1.TabPages[0].Controls[0]; if (tb.InvokeRequired) { delegateString ds = new delegateString(ShowState); this.Invoke(ds, str); } else { tb.Text += Environment.NewLine; tb.Text += str ; } } catch (Exception exc) { MessageBox.Show(exc.Message); } }