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!
Jump to Post
One 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 RepliesReply to this topic
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.