>***** >local Passed, ToCome, x > > >with this.Parent * Passed = Seconds() - .InitialSeconds Passed = datetime()-.StartDTTime && Would be a new property of the class > > if( .AtValue == 0 ) > ToCome = 0 > else > && in case atvalue > maxvalue > ToCome = max(0, (.MaxValue-.AtValue) * Passed/.AtValue) > endif > * x = ttoc( {00:00}+ Passed, 1)----> error come on this line x = ttoc(datetime(),1) && Current time > 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