
text files) are further searched to see if they contain a specific string. Just for interest I have extended this basic scenario so that files that match a particular file type (e.g. The actual task is a (kinda) real world one where the code makes a search for specific files in directories on a user's hard drive. The BackgroundWorker won't meet every possible scenario where you have to get stuck into multithreading, but it's a very useful little tool in many basic situations.įor this example I am going to run a slow, somewhat resource intensive process on a background thread and will test that it is working as it should by making another form containing other controls available to the user while the slow background task is running. As you probably know, this is a helper component that wraps away some of the down-and-dirty stuff you need if you want to use multithreading. Introduction This article came about because I had seen several posts on vbCity recently where I thought the best approach might be to use a BackgroundWorker. He has written and continues to tutor a number of free online courses for VB.NET developers. Senior Editor for DevCity.NET, vbCity Developer Community Leader and Admin, and DevCity.NET Newsletter Editor. He is a moderator on VBCity and the MSDN Tech Forums and spends a lot of time answering technical questions there and in several other VB forum sites. Ged is a regular contributor to forums on vbCity and authors articles for DevCity.

Now working in a consultancy environment, his passion however still remains helping students and professional developers to take advantage of the ever increasing range of sophisticated tools available to them. These include training as a Systems Analyst, working in a mainframe software development environment, creating financial management systems and a short time spent on military laptop systems in the days when it took two strong men to carry a 'mobile' system.īased in an idyllic lochside location in the West of Scotland, he is currently involved in an ever-widening range of VB.NET, WPF and Silverlight development projects. His journey has taken him through many different facets of IT.

Ged Mead ( XTab) is a Microsoft Visual Basic MVP who has been working on computer software and design for more than 25 years.
