Hi!
A while ago I wrote a tool to analyze the size of folders on the harddrive using .NET FW 1.1.
The time has come to port it to .Net FW 2.0 and at the same time implement some improvements.
One of the things I would like to do is to let a separate thread iterate throgh the folders of the filesystem so that the user interface does not lock while the iteration, which takes quite some time, is being performed.
For this purpose I am using a BackgroundWorker. This is where I get problems. I am letting the worker build up the folder tree in a TreeView. However, I realized that threads are not allowed to call methods of controls which "belong" to the Mainform, and I am now wondering how I should solve this.
I guess I could let the thread build up a separate tree, and return that enourmous tree after it has completed iterate it, and then copy this tree to the TreeView. This however does not seem like a slim way.
Does anyone have suggestions
Thanks for any tips!

How to use separate thread to iterate through file system and display results in a TreeView?
RickSmithers
Worko
Letting the worker send bathes of processed data sounds like a reasonable hack, thanks for the tip!
I'm still open for other suggestions though.