Reputation: 3214
I know how to update a winform when 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?
Upvotes: 0
Views: 145
Reputation: 43311
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.
Upvotes: 1