Autor Beitrag
schitho
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 288

XP Home SP2
D2005 Prof
BeitragVerfasst: So 13.07.03 22:23 
Hi,

ich verwende idFTP von Indy 9.

Um eine Statusbar anzuzeigen, sollte man mit dem Ereignis OnWorkBegin und über AWorkCountMax die Größe der heruntergeladenen Date(en) erhalten.

Bei mir funktioniert das allerdings nicht, weil AWorkCountMax immer 0 ist. :?

Oder hab ich da was falsch verstanden?

_________________
(Sorry! Leider ewiger Delphi-Neuling)
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Mo 14.07.03 15:37 
Also laut Hilfe:

Zitat:
AWorkCountMax indicates the maximum number of bytes expected for the operation sent to OnWorkBegin, or 0 when the number of bytes not known.


Das heißt, wenn die Anzahl unbekannt ist, wird 0 als Wert übergeben.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
schitho Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 288

XP Home SP2
D2005 Prof
BeitragVerfasst: Mo 14.07.03 21:26 
Hi,

wahrscheinlich eine dumme Frage: :oops:

Wovon hängt es ab, ob die Anzahl der Bytes bekannt ist?

_________________
(Sorry! Leider ewiger Delphi-Neuling)
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Mo 14.07.03 22:49 
Wenn du z.B. über IdFTP.Get deine Downloads machst, kannst du aus dessen Eigenschaften die Größe in Byte per SizeOf holen.

Das kommt aber ganz darauf an, wie du die Downloads startest.

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.
schitho Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 288

XP Home SP2
D2005 Prof
BeitragVerfasst: Mo 14.07.03 23:08 
Hi,

derDoc hat folgendes geschrieben:
Das kommt aber ganz darauf an, wie du die Downloads startest.


Den Download starte ich so:

ausblenden Delphi-Quelltext

_________________
(Sorry! Leider ewiger Delphi-Neuling)
derDoc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 623

Win Vista Prof
D2007 Prof
BeitragVerfasst: Di 15.07.03 15:44 
Dann nimmst du:
ausblenden Delphi-Quelltext
1:
function FileSizeByName(sFilename: string): cardinal;					


Also für deinen Fall:
ausblenden Delphi-Quelltext
1:
Groesse := FileSizeByName(UrsprF);					

_________________
MfG derDoc
There are only 10 types of people: those who understand binary and those who don't.