Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How To Use Progressbar at file copy time
Message
 
 
À
01/04/2002 12:38:05
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:
00639537
Vues:
20
>hi nadya
>i using win98SE, vfp6
>I send u one mail
>see the screen layout
>this is a code in timerEvent
>local Passed, ToCome, x
>


Hi again,

Try to disable timer while copying files, e.g.
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********************
>thanks again
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