网络ID:wnhoo or sos_admin 网名:e梦缘 Mail:wnhoo@163.com 风花雪月 e梦情缘
将http://delphi.ktop.com.tw/delphi.gif直接显示在timage中!
保存为文件,然后显示:
uses UrlMon ; function DownLoadInternetFile(Source, Dest : String) : Boolean; begin try Result := URLDownloadToFile(nil,PChar(Source),PChar(Dest),0,nil) = 0 except Result := False; end; end;
保存为Tsream,然后显示: procedure TForm1.Button1Click(Sender: TObject); var tm: TMemoryStream; begin try tm := TMemoryStream.Create; IdHTTP1.Get(''''http://delphi.ktop.com.tw/delphi.gif'''', tm); ShowMessage(''''OK''''); finally tm.Free; end; end;
|