[resolved] screen form update from thread
Hi.
I am trying to write multithread program for my PDA. I have problem to change any controls on program Form1 from the thread code.
For example on main program screen - Form1 I have text box defined as Form1.label.text. I can modify it easly like:
Form1.label.text="aaaa"
but it works only from main program flow. The same code does not work after thread.start() statement (no error appears)
Can someone help me to solve it? What should I do to enable Form1 components changes from thread process?
Re: screen form update from thread
Hello,
In order to do this, you have to Invoke a delegate method to perform the update on behalf of the worker thread.
You can find an example of doing this in the following article.
Hope this helps!!
Gary
Re: [resolved] screen form update from thread
Thank you very much, it works now.
Re: [resolved] screen form update from thread
Good stuff, glad it worked for you!!
If you think my post helped, don't forget to rate it :)
Gary