N
Nicolas
Doesn't run properly.
I made one dll which monitor file and send back an event for status on
changes. I use the IO.FileSystemWatcher
From the window form I want to check 5 txt file in particular
(fi_1.txt,fi_2.txt,fi_3.txt,fi_4.txt,fi_5.txt) of course not residing on the
same directory or computer.
The idea was to do the following but It doesn't work that well. For only one
file is file it's perfect. But after, it is not clear for me, So I may need
help there.
Dim i As Integer = 0
Dim WithEvents ed_checkFile As ED_myDll_Interface
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button8.Click
i += 1
Dim t As New Threading.Thread(AddressOf setTHREAD1)
obj.Add(t)
t.Start()
End Sub
Sub setTHREAD1()
Dim path As String = "D:\Development2\TEST"
Dim file As String = "fi_" & i & ".txt"
checkFile = New myDll(path, file)
End Sub
Private Sub ed_checkFile_Command(ByVal Command As myDll.Command) Handles
ed_checkFile.Command
Me.Label1.Text = "Command:" & Command.Code & " --- Type" &
Command.Type.ToString
End Sub
Is there a nicest way to monitor multiple specific file as the same time?
Thank you
I made one dll which monitor file and send back an event for status on
changes. I use the IO.FileSystemWatcher
From the window form I want to check 5 txt file in particular
(fi_1.txt,fi_2.txt,fi_3.txt,fi_4.txt,fi_5.txt) of course not residing on the
same directory or computer.
The idea was to do the following but It doesn't work that well. For only one
file is file it's perfect. But after, it is not clear for me, So I may need
help there.
Dim i As Integer = 0
Dim WithEvents ed_checkFile As ED_myDll_Interface
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button8.Click
i += 1
Dim t As New Threading.Thread(AddressOf setTHREAD1)
obj.Add(t)
t.Start()
End Sub
Sub setTHREAD1()
Dim path As String = "D:\Development2\TEST"
Dim file As String = "fi_" & i & ".txt"
checkFile = New myDll(path, file)
End Sub
Private Sub ed_checkFile_Command(ByVal Command As myDll.Command) Handles
ed_checkFile.Command
Me.Label1.Text = "Command:" & Command.Code & " --- Type" &
Command.Type.ToString
End Sub
Is there a nicest way to monitor multiple specific file as the same time?
Thank you