Hi --
I have a C# application that basically has a button that executes a SQL
Reader to loop thru a rather large resul set. Thru each interation of the
reader object, I check to see if a file exists on the server. If it does, I
update a textbox (multiline) with the missing file, update a status bar
label, and a progressbar. Since this process is kind of lengthy, every 400
rows, I do a DoEvents() and TextBox.Refersh() to refresh the form and
control... so I can see the updated info in the textbox.
This seems to work fine and is OK, but I thought that using the new
Backgroundworker control would make my UI more responsive and I could likely
remove the DoEvents and junk.
Anyway, from what I've seen thus far... it looks like the DoEvent function
of the backgroundworker control does not allow me to interact with any UI
controls. I see that I can report the progress back to my ProgressEvent,
but that appears to be all.
What is the best practice for handling this sort of scanerio?
Surely I can't be the only one that has wanted to run a query in the
background, update some controls, and finally release control back to the
main UI?????