Mostly the problem is not visually display a bar, but doing that while something runs.
More simple than what Mike has pointed to for queries is SET TALK ON. Longer running queries then show a progress bar. Also see SET ODOMETER. And last not least the _thermometer FFC class.
There must be a hundred ready-made progress bars available for you to download and use. Just to do a search for something like Foxpro progress bar. (They are also sometimes called thermometers, for no explicable reason.)
But it's also very easy to create your own. Just add a Shape control to your form. Resize it so that it resembles a horizontal bar. Give it a distinctive colour.
At the start of the process, set the bar's width to zero. Then, as the process continues, increase the width in proportion to the perentage of work done. So, for example, if the final width of the bar is 300 pixels, and half the job has been done, set the width to 150 pixels. And so on.
That's basically all there is to it.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
As an amateur programmer, I would like to thanks
1) Mike Gagnon for sharing his codes
2) Olaf for his alternative
3) Mike Lewis of his simplicity
In the back of my mind, I have been thinking about using progress bar (thinking is hard work, you know) but have not taken the initiative to search this forum.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.