F
Frank Uray
Again hi all
I have seen another problem...
I have tried to make some procedures multithreaded,
and it works fine if I for example fill a TestBox from
the threads.
As soonest I try to fill up a treeview, I get the message
that this is not allowed from another thread, I have to
make it thread-safe.
So far so good, I made a delegate and it works BUT
it is not multithreaded any more!!!
It looks like the application is waiting until the
execution of the delegated thread is finished...:-((
What am I doint wrong??
Thanks for any replay
Frank
Here is the code of it:
Private Sub Thread4_TS()
Dim theDL As New Thread4_Delegate(AddressOf Me.Thread4)
Me.Invoke(theDL)
End Sub
Delegate Sub Thread4_Delegate()
Private Sub Thread4()
Dim MyNode As New System.Windows.Forms.TreeNode("This is a
node")
Me.TreeView1.Nodes.Add(MyNode)
Dim MyShow As New Class2()
MyShow.ShowMessage(Me.TextBox1, "Thread4:")
End Sub
I have seen another problem...
I have tried to make some procedures multithreaded,
and it works fine if I for example fill a TestBox from
the threads.
As soonest I try to fill up a treeview, I get the message
that this is not allowed from another thread, I have to
make it thread-safe.
So far so good, I made a delegate and it works BUT
it is not multithreaded any more!!!
It looks like the application is waiting until the
execution of the delegated thread is finished...:-((
What am I doint wrong??
Thanks for any replay
Frank
Here is the code of it:
Private Sub Thread4_TS()
Dim theDL As New Thread4_Delegate(AddressOf Me.Thread4)
Me.Invoke(theDL)
End Sub
Delegate Sub Thread4_Delegate()
Private Sub Thread4()
Dim MyNode As New System.Windows.Forms.TreeNode("This is a
node")
Me.TreeView1.Nodes.Add(MyNode)
Dim MyShow As New Class2()
MyShow.ShowMessage(Me.TextBox1, "Thread4:")
End Sub