delegate void SetTextCallback(string text);
public Form1()
{
InitializeComponent();
}
public void SetText(string text)
{
if (this.textBox1.InvokeRequired)
{
SetTextCallback d = new SetTextCallback(SetText);
this.Invoke(d, new object[] { text });
}
else
{
this.textBox1.Text = text;
}
}
C# 跨线程设置TextBox.Text
免责声明:文章转载自《C# 跨线程设置TextBox.Text》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇【原创】大数据基础之Kudu(5)kudu增加或删除目录/数据盘VUE 页面缓存2下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=