I had to read that last part a few times myself. It can be confusing. ;)
Lets say the TreeView on your form is called myTreeView. You are doing something
myTreeView = CType(e.Result, TreeView)
and wonder why that doesn't put the new tree view on your form.
The thing is, myTreeView is just a reference variable, pointing to a TreeView.
It starts out pointing to the one created on your form. After a line like the
one above, it points to the one you created in your worker thread. But the one
on the form is still there, it just isn't being pointed to by your myTreeView
variable anymore. And the new one is not on the form; you would have to put it
there. Clear as mud?
If you look in the form designer.vb code, you will see something like
which actually puts the control in the forms control collection. There will also
be a lot of properties set, such as size, position, and so on. You would need to
remove the TreeView that is in the form's controls collection, and add your new
one to it, transferring all the settings from the old one to the new one.
Is there anyway to just get a collection of Nodes back, and assign that to the