I'm currently building a Queue Systems for processing Customer Information. These file are processed as they are received and I am trying to build a queue to hold the file names for sequential processing. I tried building one with the QUEUE Class but was unable to get it to update more than One Item in the Que. The Idea is that every time a file is dropped into this Directory the File watcher should be activated and place the item in the que where it will be processed in sequential order. But thats not the case, Instead It will process one at a time but it will not accecpt multiple files and then process the sequentially. It overides what is supposed to happen and I'm confused as hell. Any Help would be appreciated. Thank you.
Private Sub FileSystemWatcher1_Changed(ByVal sender As _ System.Object, ByVal e As System.IO.FileSystemEventArgs) Handles QUEwatcher1.Changed
Dim i As String
Dim myQ As New System.Collections.Queue
Dim QueItem as String
QueItem = e.Name
i = QueItem
myQ.Enqueue(i)
CountItemsQuelbl.text = myQ.Count()
myQ.Peek()
myQ.Dequeue()
End Sub