Re: How to display messages to the user during long processes!!
To add to what others have written, and I would also use a progress bar,
probably on the status bar or a pop up dialog for this sort of thing, you
may want to provide a way to cancel the operation if you think it may take a
really long time to accomplish. I always hate it when I'm held hostage by a
program that is "doing something" and if you are doing this in a thread
even if they exit the program the thread loop may still be executing and
that will cause you more grief. I typically put a function into the thread
object Cancel() that sets a variable that tells the thread to stop executing
no matter what it is doing.
You may also have trouble doing the progress bar if you are using an
external parsing library. I know this sort of thing is really difficult to
do with something like Xerces because it just sort of takes over and you
don't really know how far you are along in the process until it's done. You
do get call backs for elements, but you don't really know the % of the
process that is complete so it's a guess at best...
Tom
<raghudr@gmail.com> wrote in message
news:e31d9d3a-58c1-48fa-b31a-0fef91ba8d10@25g2000hsx.googlegroups.com...
I am parsing a big .xml file which will take around 1-2 minutes to
fully complete.
In that time i want to show a message "Please wait... Loading in
Progress" to the user.And once the loading(one function i call to
do this job) is executed the message should go automatically.
Can anyone please guide me how this can be done
Thanks,
RAGHU