Obviously you're going to have to put a 'Do Events' or the like somewhere in your procedure to allow a timer to trigger the progress bar update when needed. And this, of course, will slow things up slightly. There are probably ways to minimize the effect, but I'll let the real experts around here decide what's best. -- Dave
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.
DOEVENTS is not required.
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
[tab].Alignment = 2
[tab].DisabledBackColor = RGB(255,25,255)
[tab].DisabledForeColor = RGB(0,0,0)
[tab].Enabled = .F.
[tab].TabStop = .F.
[tab].Visible = .F.
ENDWITH
WITH THISFORM.shpProgressBar
[tab].BackStyle = 0
[tab].BorderStyle = 0
[tab].DrawMode = 14
[tab].FillColor = RGB(0,0,128)
[tab].FillStyle = 0
[tab].Height = && 2 less than txtProgressBar
[tab].Top = && 2 lower than txtProgressBar
[tab].Visible = .F.
[tab].Width = 1
ENDWITH
The following code might be typical of table processing and needs including in your SCAN...ENDS loop etc.
WITH THISFORM
[tab].txtProgressBar.Value = ;
[tab]ALLTRIM(STR((lnCount / RECCOUNT(
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.