Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple progress bar

Status
Not open for further replies.

imox

Programmer
May 13, 2013
37
DE
Hello,

How can I make a simple progress bar?

Cheers!
Imox
 
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.

Bye, Olaf.

 
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)

Visual FoxPro articles, tips and downloads
 
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top