Hi i have a program that run threads and updates the UI in the process. I have used .invokerequired for a safe threading and everything is running OK. In one of the threads it is necessary to use the value of an item in the listbox which is created in another thread (ListBox2.Items(index))
and i'm currently doing that with dim item1 as integer =ListBox2.Items(index)
. Now the program is running fine and showing no exceptions or error messages, however, if i add a watch of the same line i get the following message + AccessibilityObject {"Cross-thread operation not valid: Control 'ListBox2' accessed from a thread other than the thread it was created on."} System.InvalidOperationException.
Is it normal? is there a way to safely get a value of an item in the listbox which is located on another thread?