Implementing a Solution

For our solution we will offer a staggered approach. First we will separate the incoming processing of files—which entails moving them to the outgoing path—from the processing of the files, the e-mail being sent, and the actual movement into the Processed folder.

Creating a New <FileWorker.ProcessingIncoming> Method

Creating a new <FileWorker.ProcessingIncome> method is fairly straightforward. In this case we take the FileWorker class and implement the code shown in Example 5-10 by replacing the FileWorker class <ThreadFunc> method.

Example 5-10. The new <ProcessIncoming> thread method.

Private Sub ProcessIncoming() While Not m_ThreadAction.StopThread If Not m_ThreadAction.Pause Then Try For Each TextFile As String In My.Computer.FileSystem.GetFiles( ...

Get Programming Windows® Services with Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.