Hi All,
I currently have a form with a listview. On another form, I would like get all the items from that listview. This I can achieve but I always get the "Cross-Thread operation not allowed exception" message.
I've tried the following code to avail. Any suggestions?
vb Code:
Delegate Sub ListView_Delegate(ByVal [tslvw] As ListView) Private Sub ListView_ThreadSafe(ByVal tslvw As ListView) If [tslvw].InvokeRequired Then Dim MyDelegate As New ListView_Delegate(AddressOf ListView_ThreadSafe) Me.Invoke(MyDelegate, New Object() {[tslvw]}) End If End Sub




Reply With Quote