Normally we use a progress bar to indicate a progress. If we do not have definite values, we set the indeterminate value as true and display a spinning wheel. It is called Activity circle.
There is another type of indeterminate progress called Activity bar, which is used by many Google apps.
It is a horizontal bar but without any starting or ending point to show the progress and will keep on going until we clear it.
The problem of the regular progressbar is that it needs "doevent" every cycle of the loop that hasn't ended yet, and while doing so it slows down the performance of the loop.
If you'll look here http://www.b4x.com/forum/additional...it-instead-progressdialogshow.html#post149659 you'll see that I made a class with the ability to define the rate of doevents (to a slower rate then the loop's rate), so the performance is less effected.
I don't know of a way just to put this on and then off, it must be included in some for-next or do while/until loops.
The display involved is much more complicated then what you ask for - this can be done with moving few labels .
The common problem to all progress bars is that only the main thread can update the GUI. So when you're doing something in the main thread, you have to let some time to other threads for refreshing the UI. Hence the DoEvents.