-
July 2nd, 2011, 11:29 AM
#1
Updating form control from another thread
I have a a class for handling a socket comunication. It generates an event on message arrival.
On a windows form I use that class and register the event.
On the event handling routine I have to use thread sincronization to be able to update the forms controls witch is very anoying.
...
SendOrPostCallback callback = delegate(object state)
{
fromthreadCarrega_Cartao(state);
};
_uiSyncContext.Post(callback, data);
...
It there a better way to do this?
Tags for this Thread
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
|