Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi txt in Memo (https://www.delphipraxis.net/23875-txt-memo.html)

Micha 11. Jun 2004 08:17


txt in Memo
 
Wenn ich mir eine txt-Datei aus dem Internet in ein Memo holen will, bekomme ich immer eine Fehlermeldung: "Socket-Fehler # 10053 Die Software hat den Abbruch der Verbindung verursacht."

Delphi-Quellcode:
Memo1.Lines.Text := IdHttp1.Get('http://www.bla.de/text.txt');
Weiß jemand, woran das liegt? IE-Einstellung? Firewall-Einstellung?

Micha 11. Jun 2004 09:11

Re: txt in Memo
 
Habs jetzt so gemacht, dass ich die File zuerst in einem txt-File speichere.
So funktionierts:

Delphi-Quellcode:
procedure Tfrm_main.Button5Click(Sender: TObject);
const
  // URL Location
  SourceFile = 'http://blabla.de/bla.php';
  // Where to save the file
  DestFile = 'c:\bla.txt';
begin
  if DownloadFile(SourceFile, DestFile) then
  begin
    ShowMessage('Download succesful!');
    // Show downloaded image in your browser
    ShellExecute(Application.Handle, PChar('open'), PChar(DestFile),
      PChar(''), nil, SW_NORMAL)
  end
  else
    ShowMessage('Error while downloading ' + SourceFile)

end;


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:16 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz