Background thread accessing main thread controls

Hi,
In my form load I am creating a background thread which listens on a particular port for some message. When a message is received, I have to refresh the form display for which I have to access some controls of the form's thread. When I try to access these controls I get a cross threading exception. Can someone please point out a workaround for this.

Thanks & Regards,
Kunal


Answer this question

Background thread accessing main thread controls

  • VuduLord

    Here is an example:
    http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpguide/html/cpconDevelopingMultithreadedWindowsFormsControl.asp



  • Background thread accessing main thread controls