MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

ProgressBar (?)

  Asked By: Raynard    Date: Nov 14    Category: MS Office    Views: 721

Is it possible to utilize the "clock-time" for the start of ProgressBar ?
Then for each call to the ProgressBar subroutine, it would retrieve the
"clock-time" each time to update the %(percentage)

Have you ever watched the ProgressBar of an Office2003 Complete Installation ?
You will see hundreds of multiple messages and showing the progress bar for each



2 Answers Found

Answer #1    Answered By: Aaron Evans     Answered On: Nov 14

Here is another thought.
For every single subroutine, you can have unique set of line numbers
inserted into each subroutine  for the whole application.
I now do this with MZTools ( www.mztools.com )
I use the line numbers for my error trapping section in each subroutine, along
with the subroutine name stored in a local variable in each subroutine.

Question is this:
At entry point of each subroutine, is there a variable that knows the total
numbers of lines in it ?
If so, you could take this total number of lines as the limit number and
calculate the %(percentage) for the progress  bar.
This would show the progress bar  from 0% to 100%, for each subroutine entry and
Is this possible to do ?

Answer #2    Answered By: Salvatore Kelly     Answered On: Nov 14

Yep, all that is possible. My example is strictly based on two quantities -
the current count item, the total number of items.

If you watch the thing at work in the File Cataloger, you'll see that it
sort of does like the office install but it lacks (and can easily be
modified to) handle progress  in multiple  counts. For instance, the Office
installation is based on the percentage of the total job and percentage of
the current sub task within that larger job. The only difficult part is
getting your quantity values.

In the sample I gave, the 0 to 10000 approach is merely a unit test (and 0
is out of range so we have to be careful there). Used practically, the File
Cataloger looks at the total number of files in a given directory and the
count of the file you're currently working with. When you're ready to show
that element of progress, you merely pass the info with the current count

If you decide to work with time  quantities, you introduce a new issue where
accuracy is concerned. The test model is easy: perform your time based
progress on a new machine then run the same test on an older slower machine.
Time is 'different'in progress measurement because you're really measuring a
quantity of work, not time, and the difference in progress rate is not a
linear 3:1 ratio between, say, a PII 200 and a Pentium 4 at 3GHz.

Didn't find what you were looking for? Find more on ProgressBar (?) Or get search suggestion and latest updates.

Related Topics:



Related Post