Cross Thread Comunication
-
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....
-
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....
-
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....
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.
-
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....
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
-
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
That was all good stuff. Thank you everybody. :-D
oooo, the Jedi's will feel this one....