|
-
Jun 11th, 2008, 05:33 PM
#1
Thread Starter
New Member
[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?
Last edited by plexi; Jun 13th, 2008 at 05:55 PM.
-
Jun 12th, 2008, 02:13 PM
#2
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
-
Jun 13th, 2008, 05:48 PM
#3
Thread Starter
New Member
Re: [resolved] screen form update from thread
Thank you very much, it works now.
-
Jun 13th, 2008, 05:50 PM
#4
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|