ok danke für die Antworten.
Aber zu dem Boolean: Das hab ich auch schon probiert nur das geht leider auch nicht weil ich mit postcode etwas sende und als Antwort bekomm ich halt den Download und dann würds auch wieder sofort nach dem senden löschen =(
Edit:
So das mit der %-Anzeige klappt jetzt und ich hab mir mal ein kleines programm gemacht um das mit den Threads auszuprobieren.
Das ist meine Thread Unit:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32:
| unit DownloadThread;
interface
uses Classes, IdHttp, IdComponent;
type TDownloadThread = class(TThread) private
protected procedure Execute; override; end;
implementation
procedure TDownloadThread.Execute; var IdHttp1: TIdHttp; FileS: TFileStream; begin IdHttp1:=TIdHttp.Create; FileS:=TFileStream.Create('Origin3.swf', fmcreate); IdHttp1.Get('http://hendiupdate.de.tk/Maple/Origin3.swf', FileS); FileS.Free; end;
end. |
Kann ich es jetz noch irgendwie machen das auch OnWork, OnWorkBegin und OnWorkEnd von dem iDHTTP funktioniert? Und wie mach ich das: (das geht irgendwie nich):
Delphi-Quelltext
1:
| procedure TDownloadThread.Execute(Filename: String; URL: String); |