TwistedHope
New member
Hello all.
I thought my problem I'm having must be common, but I couldn't find anything useful via Google. I'm building a find/replace application, and while the find/replace method is running, I want to keep the user informed on the progress with a ProgressBar. While the find/replace routine is executing the ProgessBar updates itself after the find/replace is completed for each individual file (it does this find/replace for all files in a specified directory). The ProgressBar doesn't run smoothly through this process and looks like crap. For example, in Vista the progress bars have the glare that goes over the progress bar every couple seconds and when this happens it definitely looks like the program is lagging and doesn't appear smooth.
I tried running this process using a new thread, and also tried it using the BackgroundWorker. Both methods worked to fix the smoothness issue with the ProgressBar, but severely slowed down the speed at which the find/replace process was ran (from roughly 8 seconds to about 75 seconds). Is there any way to fix this? Also note that when using the BackgroundWorker I only called ReportProgress for it after each file had executed the find/replace routine (so maybe 10 times total), so I wasn't updating the UI too much which would explain a slowdown.
I would rather not post code unless absolutely necessary. Let me know if it is needed.
Thanks in Advance!
Matt
I thought my problem I'm having must be common, but I couldn't find anything useful via Google. I'm building a find/replace application, and while the find/replace method is running, I want to keep the user informed on the progress with a ProgressBar. While the find/replace routine is executing the ProgessBar updates itself after the find/replace is completed for each individual file (it does this find/replace for all files in a specified directory). The ProgressBar doesn't run smoothly through this process and looks like crap. For example, in Vista the progress bars have the glare that goes over the progress bar every couple seconds and when this happens it definitely looks like the program is lagging and doesn't appear smooth.
I tried running this process using a new thread, and also tried it using the BackgroundWorker. Both methods worked to fix the smoothness issue with the ProgressBar, but severely slowed down the speed at which the find/replace process was ran (from roughly 8 seconds to about 75 seconds). Is there any way to fix this? Also note that when using the BackgroundWorker I only called ReportProgress for it after each file had executed the find/replace routine (so maybe 10 times total), so I wasn't updating the UI too much which would explain a slowdown.
I would rather not post code unless absolutely necessary. Let me know if it is needed.
Thanks in Advance!
Matt