Hello,
I've got a bit of a problem, I'm using a backgroundworker to do a lot of processing and it adds items to a listview with:
AddListItem(ListView1, listItem)
Here is the delegate code to send the command to the listview outside of the thread:
Delegate Sub AddListItem_Delegate(ByVal [ListView] As ListView, ByVal [text] As Object)
Private Sub AddListItem(ByVal [ListView] As ListView, ByVal [text] As ListViewItem)
If [ListView].InvokeRequired Then
Dim MyDelegate As New AddListItem_Delegate(AddressOf AddListItem)
Me.Invoke(MyDelegate, New Object() {[ListView], [text]})
Else
ListView1.Items.Add([text])
End If
End Sub
The problem is, as you might imagine, flickering of the listview. Can anyone help me out with a solution to execute a LockWindowUpdate(Me.Handle) command in the backgroundworker? I've tried creating a new delegate but it's not working (errors, I don't understand vb.net enough).
Thanks!