Connecting Tech Pros Worldwide Forums | Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old Sep 8 '09
Newbie
 
Join Date: Sep 2009
Posts: 2
I'm using filesystemwatcher to monitor a file, but the only trigger i can see are:
changed
created
deleted
disposed
error
renamed

here's what i have:


Public Class Form1

Private Sub FileSystemWatcher1_Changed(ByVal sender As System.Object, ByVal e As System.IO.FileSystemEventArgs) Handles FileSystemWatcher1.Changed
Dim x As Integer
x = x + 1
Label1.Text = ("File: " & e.FullPath)
Label2.Text = (x)
End Sub
End Class


What I want is when a file is opened and is being used, label2 will increment and label1 will print the path and time no problem with the date and time. the problem is i don't know what to use to trigger the when file is used/opened



 

Thread Tools Search this Thread
Search this Thread:

Advanced Search