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?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.