select Bldmstr lnReccount=reccount() lnCount=0 lcMsgTail = "/" + transform(m.lnReccount) + ". Wait or press Esc to cancel ..." * -- Checking all the records in BldMstr one at a time select BldMstr set order to curEsc = set ('escape') lcOnEsc=on('escape') set escape on llEsc= .f. on escape llEsc = .t. loTherm = newobject("thermometer", "wg","","Calculating Progress for:" + m.lcTitle, ; m.lnReccount) loTherm.show() with thisform .lockscreen=.t. scan if m.llEsc and .NiceEsc() exit else llEsc = .f. endif lnCount=m.lnCount+1 * -- Updating the percentage bar if mod(m.lnCount,100) = 0 or (m.lnCount>=m.lnReccount-10) loTherm.update(m.lnCount) set message to ' Record #'+transform(m.lnCount) + m.lcMsgTail endif do case case m.tcMode = "Parse Situs" .ProcParse(m.tcMode, m.llProgramExists) case m.tcMode = 'Parse Owner' .ProcParse(m.tcMode, m.llProgramExists) case m.tcMode = 'ResOwner' .ProcResOwner() case m.tcMode='Auto Situs' .AutoAddrSitus() case m.tcMode='Auto Owner' .AutoAddrOwner() endcase endscan set message to 'Process is complete...' *!* loTherm.complete() if vartype(loTherm)='O' loTherm.release() endif release loThermI want to have progress bar SMOOTH and a percentage label inside the progress bar (9). Does your file have a sample program?
>SET CLASSLIB TO commctrl.vcx ADDITIVE >oForm = CREATEOBJECT("form") >WITH oForm > .ADDOBJECT( "oProgBar", "progressbar") > .oProgBar.VISIBLE = .T. > .SHOW() > CLEAR > WITH .oProgBar > .SetRange( 0, 100) > FOR m.i = 1 TO 10 > .StepIt() && default step increment is 10 > WAIT '' TIMEOUT .2 > ENDFOR &&* m.i = 1 TO 10 > ENDWITH >ENDWITH>If you're interested in a ready-to-use progress bar based on this class, you can download my progbar.zip from the UT files section (file ID 737). It's based on Alexander's class library, which is used with his permission.