开发者

How to access to winform controls from the other thread?

For examle, I want to change text in the textBox from开发者_如何学编程 the method of the other class. How should I do it?


You can only access WinForm controls from the thread that created them (the same is true in WPF). But there is a mechanism inbuilt to help you: Invoke.

See this question for examples: WinForms interthread modification

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜