Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Progress bar on COPY FILE
Message
 
 
À
05/12/2000 16:33:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00448749
Message ID:
00449653
Vues:
9
>It doesn't hang, it just takes along time to move 150mb (my test) k by k, so change it to move it 100k at a time and it should go faster. The lower the byte size the slower the move will be.

Ok, I changed this test a little bit, and not it works great. The progress bar itself needs some beautifying, but the idea is great and simple.

local lnSize, lnPortion
lnSize=aSize[2]
_screen.pBar.nMaxValue = lnSize
lnPortion=lnSize/100
lnH = FOPEN(lcFile)

lnH2 = FCREATE('c:\dest\'+justfname(lcFile)) && Save current extension and name

FOR lnI = 1 to lnSize
FWRITE(lnH2, FREAD(lnH, lnPortion), lnPortion)
_screen.pBar.nValue = _screen.pBar.nValue + 1
ENDFOR

If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform