Reputation: 2809
How can i change image index of a tree view node in a threadsafe manner? There is no Invoke() method for TreeNode class.
Upvotes: 0
Views: 371
Reputation: 28316
You can call Invoke
on the form instead of the component itself.
Component code executes on the thread of the form, so an invoke on a component simply delegates the operation to the form's thread. You'll get exactly the same result by using form.Invoke
as you would form.component.Invoke
.
Upvotes: 3