Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Use Progressbar at file copy time
Message
 
 
To
01/04/2002 09:29:31
Mazahir Naya
Kuwait United Co.
Kuwait, Kuwait
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00639255
Message ID:
00639424
Views:
32
Hi Mazahir,

Instead of Seconds() function (or in addition) use datetime() function, e.g.:
(see some additions inside your code)

>hi Nadya
>this code in time events
>*****
>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
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform