thisform.timer1.enabled = .f. thisform.CopyFiles(cSourceString, cDestString) && Use code from API #12730 thisform.timer1.enabled = .t.BTW, use PRE tags to show your code in better format.
>with this.Parent > Passed = Seconds() - .InitialSeconds > > if( .AtValue == 0 ) > ToCome = 0 > else > && in case atvalue > maxvalue > ToCome = max(0, (.MaxValue-.AtValue) * Passed/.AtValue) > endif > > x = ttoc( {00:00}+ Passed, 1) > x = right('0' + ltrim(str(int(Passed/86400),2,0)),2) ; > + ':' + substr(x,9,2) + ':' + substr(x,11,2) + ':' + right(x,2) > > > .TimeElapsed.Caption = x > > x = ttoc( {00:00} + ToCome, 1) > x = right('0' + ltrim(str(int(ToCome/86400),2,0)),2) ; > + ':' + substr(x,9,2) + ':' + substr(x,11,2) + ':' + right(x,2) > > > .TimeLeft.Caption = x > >endwith > >return Passed>**************end of code********************