Wow, that's a complicated project!
1. Does a datagridview need a static datasource? Yes and no. DataGridViews require that you pass a data source to it, whether you pass an IEnumerable collection, a Collection of a type or a DataSet, it must be a collection. Your project is a tad more complicated because you'll need to use threads to scan the network, possibly a delegate to trigger a callback/event (i.e., OnAfterNetworkScan -> do something), and a locked resource (i.e. list/collection). Since I'm not a threading guru, please take this with a grain of salt, but once you trigger the callback/event you'll need to update the data source and rebind it to the DataGridView.
Quote:
I see that that block of code would force me click a button 100 times to complete the bar. And that same code can also be put into a timer to make it take 100 seconds to complete the bar. What I don't under stand is how to make that work for say, a file download or a process taking place in the program. For a file download would the code work
Again, it's a tad more complicated. You can't simply put it inside a background thread that steps the counter. Most file downloads are synchronous (i.e., it blocks a thread to do its work, so the app has to wait). C#/.NET has an asynchronous mechanism for almost all Stream/WebRequests. The reason for this is that while most I/O can be done synchronously, sometimes, you can't have the app block a thread for various reasons. When you want the current thread to continue without being blocked, you call an asynchronous method. They typically begin with Begin* and End*. They're a pain to use and a freakin' pain to understand. I don't use them, I hate them and I'm awaiting .NET 4.5 for Microsoft to make it simpler by adding the await keyword to the syntax list. I mean, seriously, when you look into asynchronicity in your app, you're looking at callbacks as tall as the Sears Tower.
If you're really intersted in learning these things, pick up a book on threading, threading patterns, asynchronous programming and events.