看看下面代码就知道了

        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);
            }
        }

相关文章:

  • 2022-02-10
  • 2022-01-08
猜你喜欢
  • 2022-03-01
  • 2021-10-08
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-11-28
  • 2021-08-28
相关资源
相似解决方案