PUBLIC oForm
oForm =CREATEOBJECT("Form")
SET TALK OFF
WITH oForm
.CAPTION=""
.AUTOCENTER= .T.
.WIDTH= 375
.HEIGHT= 31
.VISIBLE= .T.
.CONTROLBOX= .F.
.ADDOBJECT("oBarra","OleControl","mscomctllib.progctrl.2")
WITH .oBarra
.VISIBLE= .T.
.LEFT= 4
.TOP= 5
.WIDTH= 368
.HEIGHT= 20
.MIN= 1
ENDWITH
ENDWITH
CREATE CURSOR MiTabla (Campo C(12))
FOR i = 1 TO 10000
APPEND BLANK
ENDFOR
nTotReg =RECCOUNT("MiTabla")
LOCATE
oForm.oBarra.MAX= nTotReg
INDEX ON Progreso(Campo, RECNO(), nTotReg) TAG Campo
oForm.RELEASE
FUNCTION Progreso(Campo, nRecno, nTotReg)
cProg = TRANSFORM(ROUND((nRecno/nTotReg)*100,0)) +"%"
oForm.CAPTION="Progres " + cProg
oForm.oBarra.VALUE= nRecno
RETURN Campo
ENDFUNC
Niciun comentariu:
Trimiteți un comentariu