|
-
Apr 15th, 2010, 05:49 PM
#8
Re: TCP Client responding to the main thread like Winsock
The synchronizationcontext solution is dead simple, but not easy to turn into a simple example, which is why I mentioned the class I have it used in. You basically create a variable to hold synchronization.Current, and set it to that while in the UI thread. You can then call the Post method on that variable to call a method in the UI thread. Doesn't get much easier than that. In my example, the method I call just raises events, but you could do whatever you wanted.
My usual boring signature: Nothing
 
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
|