Background worker help (newbie)

Jose Cuervo

Member
Joined
Jul 14, 2010
Messages
14
Programming Experience
1-3
Hi,

I have an application that monitors a folder, then if a file is created in it, it waits 3 seconds, reads text in the file, then moves to another folder depending on what is in it or the extension of the file.

Now i am thinking, because i need to adding a 'doevents' in order to let my program update my textbox as it goes along, i should off load the reading and moving the files to a background worker, but leave the folder watcher under window initialized.

So i have my watcher running, and then i have an
If e.ChangeType = WatcherChangeTypes.Created Then
[was going to say call background worker]
End if

My first problem is, on my watcher i can get e.Fullpath and then manipulate from there. But when i put anything to look to e.Fullpath in my Private Sub BackgroundWorker_DoWork, i get an error about 'FullPath is not a member of System.ComponentModel.DoWorkEventArgs'

How can i pass the file name down to the background worker?

Sorry about this, i am quite new to programming, so can you please be gentle with me. :)

Thanks
 
Back
Top