
adding a node to treeview from another thread
Thanks for the great example.
If my function (UpdateProgress) gets 2 string argumenets, how do I call it ?
Your example invoke a function without arguments.
code:
Dim mi As New MethodInvoker(AddressOf Me.UpdateProgress)
Me.BeginInvoke(mi)
Private Sub UpdateProgress(string1 as string, string2 as string )
Thanks
Quote:
> > I am trying to add a node to a treeview from another thread in VB.net
> > I know I should use the invoke method but I can't find a good example.
> > My code is:
> > Treeview1.Nodes.Add(New TreeNode("testing)))
> > Can someone give me a simple example ?
> > Thanks
> http://gotdotnet.com/quickstart/howto/doc/WinForms/WinFormsThreadMarshal
> ling.aspx
> --
> Patrick Steele
> Microsoft .NET MVP