Imports System.Windows.Forms
Imports System.Diagnostics
Imports System.ServiceProcess
Imports System.IO
public class Test
Private Shared WithEvents m_FileSystemWatcher As FileSystemWatcher
public Shared Sub Main
m_FileSystemWatcher = New FileSystemWatcher(Application.StartupPath)
m_FileSystemWatcher.EnableRaisingEvents = True
End Sub
Private Shared Sub m_FileSystemWatcher_Created(ByVal sender As Object, ByVal e As System.IO.Fil
eSystemEventArgs) Handles m_FileSystemWatcher.Created
Console.WriteLine(e.FullPath & " created")
End Sub
End class