I need to read a value from a listview that is on the ui thread from another thread. I know how to set a value using:
Invoke(Sub() Me.lv.Items.add("data"))
But I need to retrieve a value from a listview and am not sure how. Here is what I have so far:
dim selectedItem = Invoke(Sub() Me.lv.Items(x).Text)
I get an error that I need to assign the value to something, but not sure how to do that when I use invoke.
dim selectedItem = CStr(Invoke(New Func(Of String)(Function() Me.lv.Items(x).Text)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With