Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Use Progressbar at file copy time
Message
 
 
À
01/04/2002 09:29:31
Mazahir Naya
Kuwait United Co.
Kuwait, Kuwait
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00639255
Message ID:
00639424
Vues:
30
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform