lcFile = getfile() > >_screen.AddObject('pbar', 'progressbar') >_screen.pbar.nValue = 0 >_screen.pbar.Visible = .T. >ADIR(aSize, lcFile) >_screen.pBar.nMaxValue = aSize[2] > >lnH = FOPEN(lcFile) >lnH2 = FCREATE('c:\dest.txt') > >FOR lnI = 1 to aSize[2] > FWRITE(lnH2, FREAD(lnH, 1024), 1024) > _screen.pBar.nValue = _screen.pBar.nValue + 1 >ENDFOR > >FCLOSE(lnH) >FCLOSE(lnH2) > >DEFINE CLASS progressbar AS container > > Width = 324 > Height = 55 > BackStyle = 0 > BorderWidth = 0 > nvalue = 0 > ccaption = "" > nmaxvalue = 100 > Name = "progressbar" > > ADD OBJECT cntbar AS container WITH ; > Top = 19, ; > Left = 6, ; > Width = 312, ; > Height = 31, ; > SpecialEffect = 1, ; > Name = "cntBar" > > ADD OBJECT lblstatus AS label WITH ; > AutoSize = .T., ; > BackStyle = 0, ; > Caption = "Status", ; > Height = 17, ; > Left = 10, ; > Top = 0, ; > Width = 37, ; > Name = "lblStatus" > > ADD OBJECT shpbar AS shape WITH ; > Top = 23, ; > Left = 10, ; > Height = 24, ; > Width = 304, ; > BorderStyle = 0, ; > BackColor = RGB(0,0,128), ; > Name = "shpBar" > > PROCEDURE ccaption_assign > LPARAMETERS vNewVal > *To do: Modify this routine for the Assign method > THIS.ccaption = m.vNewVal > this.lblStatus.Caption = m.vNewVal > ENDPROC > > PROCEDURE nvalue_assign > LPARAMETERS vNewVal > *To do: Modify this routine for the Assign method > THIS.nvalue = m.vNewVal > if vNewVal => 0 and this.nMaxValue > 0 > this.shpBar.Width = (vNewVal / this.nMaxValue) * 304 > else > this.shpBar.Width = 0 > endif > ENDPROC > > PROCEDURE updatebar > LPARAMETERS vNewVal > *To do: Modify this routine for the Assign method > THIS.nvalue = m.vNewVal > if vNewVal => 0 and this.nMaxValue > 0 > this.shpBar.Visible = .T. > this.shpBar.Width = (vNewVal / this.nMaxValue) * 304 > else > this.shpBar.Visible = .F. > endif > ENDPROC >ENDDEFINEMike,