TreeViews and Multi-Threaded Madness!
Disclaimer: The following information is for educational purposes only. Don't use at the track. I'm currently working on an app (in C#) that performs three, related tasks. Each of the tasks is performed by an object, and the app's main form has as member variables these three objects. The form also spawns three threads, one for each object, so the tasks can be performed simultaneously. The objects in turn have events, which are handled by the main form. These event handlers take care of, among other things, updating the controls on the form to display the status and progress of the various tasks. One of the controls is a TreeView. I ran into an interesting predicament a little while back when setting these event handlers up: when fired, the events could call the functions within the form class to remove nodes from the TreeView, or alter the text of the nodes, but when they tried to Add nodes, I received the following exception: "The action being performed on thi