更新进度条,线程中的文本框 [英] Update progressbar , text box from thread
本文介绍了更新进度条,线程中的文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在C#.net中,我正在尝试从线程更新进度条,文本框.请提出建议
In C#.net
I am tring to update progressbar , text box
from thread. Please advice
推荐答案
选中此 [ ^ ].其他方法是使用BackgroundWorker
类.
Check this[^]. Other way is to useBackgroundWorker
class.
添加此行
Control.CheckForIllegalCrossThreadCalls = false
例如:
公共Form1()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false;
}
Add this line
Control.CheckForIllegalCrossThreadCalls = false
For Example:
public Form1()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false;
}
这篇关于更新进度条,线程中的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文