用FTP控件,必须支持
或Http空间
或Http空间
解决方案 »
- 百分求例子。
- 一个录库单有n条记录,用什么录入方式比较好?什么控件呢?什么技术?
- 急:delphi7+ib7.1字段类型为decimal(10,2)时出现operation not applicable错误
- 日期查找的问题
- combobox的问题??急 用呀??
- 关于统计问题。
- 抽象类不能创建实例,那有什么用处??
- delphi 容错能力如何? 这样写代码 是否程序会一直 执行下去
- 关于StatusBar上放置其他控件问题
- 有关delphi调用存储过程的问题?
- 如何编程实现网络共享功能(不用其它代理软件)?即一台没有Modem的机器共享另一台有Modem的机器上网。或像SocksOnline软件一样,SocksOnline是怎么实现的?注是
- 关于sql的问题
加入NMHTTP组件.
在BUTTONCLICK事件中:
NMHTTP1.get(edturl.text);//edturl:tedit 获取下载地址
在NMHTTP1Success事件中:
procedure TForm1.NMHTTP1Success(Cmd: CmdType);
var
fname:string;
buf:string;
pnewfile,poldfile:pchar;
i:integer;
begin
{ Copyright (C) Bowman }
{ [email protected] }
//retrive the tmp file
fname:=nmhttp1.body;
//retrive file name
for i:=length(edtURL.Text) downto 1 do
if edtURL.text[i]<>'/' then
buf:=edtURL.text[i]+buf
else
break;
//assign file name
Getmem(poldFile,length(fname)+1);
StrPCopy(poldFile,fname);
Getmem(pnewfile,length(buf)+1);
StrPCopy(pnewfile,buf);
//rename it
MoveFile(poldfile,pnewfile);
Freemem(poldfile);
Freemem(pnewfile);
//show infomation
statusbar1.Panels.Items[0].text:='download complete';
lblTemp.caption:= fname;
lblFinal.Caption:=buf;
end;