Hi,
I have an app that displays specific folder file content in Window Forms and all this works fine. Problem is when I need to scan folder content again (it is read every 10 seconds), then I have "Not Responding" message if there is a lot of files to read. What would be the best way to scan files, as a Thread or BackgroundWorker (which I am using at the moment)? I don't want to have my app stucked at "not responing" message screen. Please help. Thanks!
jakub.peciak
0
Newbie Poster
Recommended Answers
Jump to PostOne solution would be to use FileSystemWatcher class which would raise an event when the folder content has changed. After that you would scan the files.
BackgroundWorker should be fine for scanning the folder. I didn't test this idea but you could raise ProgressChanged event from your BackgroundWorker thread and …
All 2 Replies
Teme64
215
Veteran Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.