开发者

Update WinForm From Non-Member Thread Process

I know how to update a winform w开发者_如何学编程hen the thread method is a member of the WinForm class using delegates. But how does this work if the thread function is not a member of the WinForm? How do you do it in this case?


In this case you need form reference in the thread function. Using this reference, you can call any public form method, and update the form by the same way as from class member.

It's up to you to decide, how to pass form reference to the thread function. Obvious way is to do this using function parameter.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜