Hi All,
I have been writing a little application that watches my documents and nay files/folders that are changed/created/deleted/renamed are copied to the main server. As a back up process it seems to work great. I have subclassed the FileSystemWatcher and put all of the logic in there and in my form all I need is:
The code is working great with one exception. If I am doing a big process, let's say copying 1GB of music the UI is frozen as the UI thread is busy.
Is it possible to put this process to a separate thread possibly using a background worker? If so can anyone give a brief example of how to do this?
Thanks, Dave.
I have been writing a little application that watches my documents and nay files/folders that are changed/created/deleted/renamed are copied to the main server. As a back up process it seems to work great. I have subclassed the FileSystemWatcher and put all of the logic in there and in my form all I need is:
Visual Basic:
fileSystemWatcher fsw = new fileSystemWatcher(true, true, true, true, @"\\source\", @"\\destination", true);
fsw.ShowProcess += new fileSystemWatcher.ShowProcessEventHandler(ShowProcess);
fsw.SynchronizingObject = this;
The code is working great with one exception. If I am doing a big process, let's say copying 1GB of music the UI is frozen as the UI thread is busy.
Is it possible to put this process to a separate thread possibly using a background worker? If so can anyone give a brief example of how to do this?
Thanks, Dave.