Accessing ListBox from multiple threads
-
I have a multithreaded application, and want to access a ListBox from multiple threads. However, if i add an item to the ListBox from a thread different from the one it was created in, the changes are only shown, once i trigger a refresh from the creation thread. Is there any way around that ?
-
I have a multithreaded application, and want to access a ListBox from multiple threads. However, if i add an item to the ListBox from a thread different from the one it was created in, the changes are only shown, once i trigger a refresh from the creation thread. Is there any way around that ?
Beginners Guide To Threading In .NET Part 5 of n[^]
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
-
Beginners Guide To Threading In .NET Part 5 of n[^]
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
-
Nice to see that you got it working :)
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
-
I have a multithreaded application, and want to access a ListBox from multiple threads. However, if i add an item to the ListBox from a thread different from the one it was created in, the changes are only shown, once i trigger a refresh from the creation thread. Is there any way around that ?
You have to use BeginInvoke method of the control while modifying the controls' property from a different thread other than which the control was created on. refer the link http://msdn.microsoft.com/en-us/library/a06c0dc2.aspx hope it solves ur problem