A
Aussie Rules
Hi
I create a number of filewatchers in my code. I have a need to delete some
of the file watchers, but can not figure out how to do this without stopping
the application and restarting.
To create the filewatcher I have this code.... There doesn't seem to be a
name or index for the filewatch so how do I delete one?
Dim watcher As New FileSystemWatcher()
watcher.Path = strPath
watcher.NotifyFilter = (NotifyFilters.LastAccess Or
NotifyFilters.LastWrite Or NotifyFilters.FileName Or
NotifyFilters.DirectoryName)
watcher.Filter = strFilter
I create a number of filewatchers in my code. I have a need to delete some
of the file watchers, but can not figure out how to do this without stopping
the application and restarting.
To create the filewatcher I have this code.... There doesn't seem to be a
name or index for the filewatch so how do I delete one?
Dim watcher As New FileSystemWatcher()
watcher.Path = strPath
watcher.NotifyFilter = (NotifyFilters.LastAccess Or
NotifyFilters.LastWrite Or NotifyFilters.FileName Or
NotifyFilters.DirectoryName)
watcher.Filter = strFilter