Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Private Sub FileSystemWatcher1_Changed(ByVal sender As System.Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Changed
- TextBox1.Text = TextBox1.Text & vbNewLine & "A file was changed"
- End Sub
- Private Sub FileSystemWatcher1_Created(ByVal sender As System.Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Created
- TextBox1.Text = TextBox1.Text & vbNewLine & "A file was created"
- End Sub
- Private Sub FileSystemWatcher1_Deleted(ByVal sender As System.Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Deleted
- TextBox1.Text = TextBox1.Text & vbNewLine & "A file was deleted"
- End Sub
- Private Sub FileSystemWatcher1_Renamed(ByVal sender As System.Object, ByVal e As System.IO.RenamedEventArgs) Handles FileSystemWatcher1.Renamed
- TextBox1.Text = TextBox1.Text & vbNewLine & "A file was renamed"
- End Sub
- End Class
- '
- 'Add a textBox and a FileSystemWatcher
- 'You will need to set a path for the filesystemwatcher to know where it is looking
- '
Add Comment
Please, Sign In to add comment