English
Source / code snippets

File Fortschrittsbalken copy

 
here an example How to the copy and the Show one Fortschrittbalkens too without Zuhilfenahme the Explorers self into hand take can.

XProfan8 with XPSE:
CompileMarkSeparation
 {$cleq}
declare infle$,outfle$ ,c&,fz&,ptr#,has&,bsize&/* TempVars */
cls;rectangle 10,10 - 110,20;usebrush 1,0// WinInit
fz&:=0;c&:=0;has&:=0;bsize&:=1024;
dim ptr#,bsize&
infle$:="c:p00x.zip"~file
outfle$="c:output.zip"~file
case len(findfirst$(infle$)):fz&:=filesize(infle$)

if (fz&)

    case (bsize&>fz&):bsize&:=(fz&2)
    /* CopyProc */
    assign #1,infle$;assign #2,outfle$;openrw #1;openrw #2

    while (filepos(#1)<fz&) ;c&:=blockread(#1,ptr#,0,bsize&):case (c&):blockwrite #2,ptr#,0,c&;has&:=has&+c&;putPerc has&,fz&;wend/* { *//* } */

        /* eoCopyProc */

    endif

    end

    proc putPerc

        parameters is&,must&
        rectangle 10,10  - (10+(is&*100/must&)),20

    endproc

XProfan8 without XPSE:
CompileMarkSeparation
DECLARE INFLE$,OUTFLE$,C&,FZ&,PTR#,HAS&,BSIZE&
CLS
RECTANGLE 10,10 - 110,20
USEBRUSH 1,0
FZ&=0
C&=0
HAS&=0
BSIZE&=1024
DIM PTR#,BSIZE&
INFLE$="c:\p00x.zip"
OUTFLE$="c:\output.zip"

IF LEN(FINDFIRST$(INFLE$))

    FZ&=FILESIZE(INFLE$)

ENDIF

IF (FZ&)

    IF (BSIZE&>FZ&)

        BSIZE&=(FZ&2)

    ENDIF

    ASSIGN #1,INFLE$
    ASSIGN #2,OUTFLE$
    OPENRW #1
    OPENRW #2

    WHILE (FILEPOS(#1)<FZ&)

        C&=BLOCKREAD(#1,PTR#,0,BSIZE&)

        IF (C&)

            BLOCKWRITE #2,PTR#,0,C&

        ENDIF

        HAS&=HAS&+C&
        PUTPERC HAS&,FZ&

    WEND

ENDIF

END

PROC PUTPERC

    PARAMETERS IS&,MUST&
    RECTANGLE 10,10 - (10+(IS&*100/MUST&)),20

ENDPROC

About BSIZE& can indirect The Kopiergeschwindigkeit take on.

salvo, iF
 
03/07/05  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.844 Views

Untitledvor 0 min.
Tommy08/08/21
Michaeal02/10/15
E.T.03/25/13
Torben Nissen03/10/13
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie