Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Cross Thread Comunication

Cross Thread Comunication

Scheduled Pinned Locked Moved C#
designtutorialquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Paul Unsworth
    wrote on last edited by
    #1

    Hi All I have an application where I am using a seperate thread to create a report. I created a public class with custom events etc for the threads to comunicate. I set up the events in my UI, but when the events are triggered by the report thread, the UI thread gets upset about it being caused by a different thread. Please can somebody tell me how to get the UI to stay happy when the events are triggered?? Thanks, :)

    oooo, the Jedi's will feel this one....

    M J K 3 Replies Last reply
    0
    • P Paul Unsworth

      Hi All I have an application where I am using a seperate thread to create a report. I created a public class with custom events etc for the threads to comunicate. I set up the events in my UI, but when the events are triggered by the report thread, the UI thread gets upset about it being caused by a different thread. Please can somebody tell me how to get the UI to stay happy when the events are triggered?? Thanks, :)

      oooo, the Jedi's will feel this one....

      M Offline
      M Offline
      moon_stick
      wrote on last edited by
      #2

      Google broken today? No, I didn't think so. A quick search for 'cross thread calls' revealed a list of links - this one[^] on code project looks promising.

      It definitely isn't definatley

      1 Reply Last reply
      0
      • P Paul Unsworth

        Hi All I have an application where I am using a seperate thread to create a report. I created a public class with custom events etc for the threads to comunicate. I set up the events in my UI, but when the events are triggered by the report thread, the UI thread gets upset about it being caused by a different thread. Please can somebody tell me how to get the UI to stay happy when the events are triggered?? Thanks, :)

        oooo, the Jedi's will feel this one....

        J Offline
        J Offline
        J4amieC
        wrote on last edited by
        #3

        http://msdn.microsoft.com/en-us/library/system.windows.forms.control.invokerequired.aspx[^] http://msdn.microsoft.com/en-us/library/zyzhdc6b.aspx[^] If its not clear after reading those two pages of documentation, feel free to post back.

        1 Reply Last reply
        0
        • P Paul Unsworth

          Hi All I have an application where I am using a seperate thread to create a report. I created a public class with custom events etc for the threads to comunicate. I set up the events in my UI, but when the events are triggered by the report thread, the UI thread gets upset about it being caused by a different thread. Please can somebody tell me how to get the UI to stay happy when the events are triggered?? Thanks, :)

          oooo, the Jedi's will feel this one....

          K Offline
          K Offline
          Karmendra Suthar
          wrote on last edited by
          #4

          To learn about Threads, Synchronous and Asynchronous calls to UI Thread, using delegates and events to communicate between threads is best explained in this article. I learnt thread reading and running the demo project, Its the Best. http://www.codeproject.com/KB/cs/workerthread.aspx[^] Regards, Karmendra

          P 1 Reply Last reply
          0
          • K Karmendra Suthar

            To learn about Threads, Synchronous and Asynchronous calls to UI Thread, using delegates and events to communicate between threads is best explained in this article. I learnt thread reading and running the demo project, Its the Best. http://www.codeproject.com/KB/cs/workerthread.aspx[^] Regards, Karmendra

            P Offline
            P Offline
            Paul Unsworth
            wrote on last edited by
            #5

            That was all good stuff. Thank you everybody. :-D

            oooo, the Jedi's will feel this one....

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups