Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. Cross-thread operation not valid: Control 'topology' accessed from a thread other than the thread it was created on...
  2.  
  3. private SynchronizationContext context;
  4.  
  5. MyForm()
  6. {
  7. InitializeComponents();
  8. context = SynchronizationContext.Current;
  9. }
  10.  
  11. ///// somewhere in another thread
  12. context.Post(myCallbackInUIThread, null) // you can use Send for synchronous call
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement