线程读写控件需要用委托(delegate)与Invoke/BeginInvoke来进行
1. 获取TextBox中的值
代码一:
1 public delegate string GetTextBoxCallBack(); 2 private string GetInputText() 3 { 4 try 5 { 6 if (this.txtInput.InvokeRequired) 7 { 8 GetTextBoxCallBack gtb = new
线程读写控件需要用委托(delegate)与Invoke/BeginInvoke来进行
1. 获取TextBox中的值
代码一:
1 public delegate string GetTextBoxCallBack(); 2 private string GetInputText() 3 { 4 try 5 { 6 if (this.txtInput.InvokeRequired) 7 { 8 GetTextBoxCallBack gtb = new