Click here to Skip to main content
15,904,297 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How to create a file system watcher in vb.net
Posted

www.google.com

Do some research, there is a lovely example on the MSDN where it tells you what the file system watcher is, and how to use it.
 
Share this answer
 
VB
Imports System.IO

Public Class Blah
    Public Sub New()
        InitializeComponent()

        Dim watcher As New FileSystemWatcher("C:\")
        watcher.EnableRaisingEvents = True

        AddHandler watcher.Changed, AddressOf watcher_Changed
    End Sub

    Private Sub watcher_Changed(ByVal sender As Object, ByVal e As FileSystemEventArgs)
        MsgBox(e.FullPath)
    End Sub
End Class
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900