Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Microsoft: FoxPro FAQ

Tips -N- Tricks

How can I create a progressbar in a form? by ChrisRChamberlain
Posted: 22 Aug 02 (Edited 30 Dec 08)

If you want to include your progress bar in a form, the following are the NON DEFAULT properties for the only two additional controls needed.

You will need to determine the position and size of txtProgressBar and make both controls .Visible = .T. during processing, and .Visible = .F. on EXITing the loop.

WITH THISFORM.txtProgressBar
    .Alignment = 2
    .DisabledBackColor = RGB(255,25,255)
    .DisabledForeColor = RGB(0,0,0)
    .Enabled = .F.
    .TabStop = .F.
    .Visible = .F.

WITH THISFORM.shpProgressBar
    .BackStyle = 0
    .BorderStyle = 0
    .DrawMode = 14
    .FillColor = RGB(0,0,128)
    .FillStyle = 0
    .Height =
&& Same as txtProgressBar
    .Top =
&& Same as txtProgressBar
    .Visible = .F.
    .Width = 1

The following code might be typical of table processing and needs including in your SCAN...ENDS loop etc, where lnCount is the number of records processed.

    .txtProgressBar.Value = ;
        ALLTRIM(STR((lnCount / RECCOUNT([TABLE])*100)))  + [%]
    .shpProgressBar.Width = ;
    lnCount * .txtProgressBar.Width / RECCOUNT([TABLE])


Chris pc2

Back to Microsoft: FoxPro FAQ Index
Back to Microsoft: FoxPro Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close