Question How to display a progress indicator on a dialog box when the main form is writing xml

prateekm20

New member
Joined
Apr 4, 2013
Messages
1
Programming Experience
3-5
I am trying to display a progress indicator when my application reads data from an excel spreadsheet and writes it to an XML file. But the progress indicator does not work also, when performing the operation, the labels on the progress bar dialog become transparent.
 
If you want the UI to remain responsive then you need to perform the long-running operation on a secondary thread. I've attached a demo that uses a BackgroundWorker. You simply have to put your real work into the DoWork event handler on the name form in place of the dummy work provided by Thread.Sleep.

At least, I'm trying to upload a demo. The site doesn;t seem to want to accept it for some reason. I'll keep trying.
 
Back
Top