Hi,
I'm current having a problem with the treeview control and multi
threading. The treeview is on a form. A request is then sent to a
server using IP for the data. The data arrives in an event on a
different thread. I have used delegates to allow me to add to the
treeview and it all works fine. I cant however seem to set the
"SelectedNo de" property or the treeview. I have tried directly and
also using a delegate. I all cases, the UI freezes for a while, then
the thread times out.
Below is a snippet of the code I have already. Does anyone have any
ideas? Any help is very much appreciated. In the
"SelectTreeview RootNode" call, I have tried using the passed in
treeview, and the actual name of the one on the form, but neither
works.
Delegate Sub TreeViewSelectR ootNodeDelegate (ByVal trvTreeview
As TreeView)
Private mdgtSelectRootN ode As New
TreeViewSelectR ootNodeDelegate (AddressOf SelectTreeviewR ootNode)
Private Sub SelectTreeviewR ootNode( _
ByVal trvTreeview As TreeView)
tvwMain.Selecte dNode = tvwMain.Nodes(0 )
End Sub
tvwMain.Invoke( mdgtSelectRootN ode, New Object() {tvwMain})
Cheers
Bobby Owens
Bo*********@ntl world.com