ftp文件下载问题,还请诸位多多帮忙 是有这个问题,以前我也发现现过,楼主一说我倒要去看一ftp的源码了,我想应该是个BUG. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 程序如下procedure TForm1.NMFTP1Success(Trans_Type: TCmdType);begincase trans_type ofcmddownload:statusbar1.SimpleText:='download success';cmdupload:statusbar1.SimpleText:='Upload success';end;end;//list buttonprocedure TForm1.BitBtn1Click(Sender: TObject);var i:integer;beginscreen.cursor:=crhourGlass;trynmftp1.parselist:=true;nmftp1.Vendor:=NMOS_AUTO;nmftp1.List;finallyscreen.cursor:=crdefault;end;end;//connect buttonprocedure TForm1.BitBtn2Click(Sender: TObject);beginnmftp1.host:=edit3.text;nmftp1.port:=strtoint(edit4.text);nmftp1.timeout:=20000;nmftp1.userid:=edit5.text;nmftp1.password:=edit6.text;nmftp1.connect;end;//download buttonprocedure TForm1.BitBtn9Click(Sender: TObject);beginnmftp1.mode(mode_image);nmftp1.Download('DTCARD.ASM','d:\download\DTCARD.ASM');end;procedure TForm1.NMFTP1Disconnect(Sender: TObject);beginif statusbar1 <>nil thenstatusbar1.SimpleText:='Disconnected';end;procedure TForm1.NMFTP1Failure(var Handled: Boolean; Trans_Type: TCmdType);begincase trans_type ofcmddownload:statusbar1.SimpleText:='download failure';cmdupload:statusbar1.SimpleText:='Upload failure';end;end;end. 程序如下//list buttonprocedure TForm1.BitBtn1Click(Sender: TObject);var i:integer;beginnmftp1.parselist:=true;nmftp1.Vendor:=NMOS_AUTO;nmftp1.List;memo1.lines.assign(nmftp1.ftpdirectorylist.name);end;//connect buttonprocedure TForm1.BitBtn2Click(Sender: TObject);beginnmftp1.host:=edit3.text;nmftp1.port:=strtoint(edit4.text);nmftp1.userid:=edit5.text;nmftp1.password:=edit6.text;nmftp1.connect;end;//download buttonprocedure TForm1.BitBtn9Click(Sender: TObject);beginnmftp1.mode(mode_image);nmftp1.Download('DTCARD.ASM','d:\download\DTCARD.ASM');end;procedure TForm1.NMFTP1Failure(var Handled: Boolean; Trans_Type: TCmdType);begincase trans_type ofcmddownload:statusbar1.SimpleText:='download failure';cmdupload:statusbar1.SimpleText:='Upload failure';end;end;procedure TForm1.NMFTP1Success(Trans_Type: TCmdType);begincase trans_type ofcmddownload:statusbar1.SimpleText:='download success';cmdupload:statusbar1.SimpleText:='Upload success';end;end;end. 如何使用鼠标进行多选操作? DELPHI + ACCESS (OFFICE2003) 多表联问题 网络映射的问题,急,请大家帮忙 能否隐藏SQL Server Agent的界面? 一个关于将DBGrid里的数据导出到EXCLE的简单问题。 这样的报表如何制作?用fastreport 过滤数据 新手上路!有没有DELPHI做网页模版的例子。请指教。up有分 取出字符串中包含的数字用什么函数? 兄弟姐妹,快点来,救,急 帮帮忙 我做了一个监控程序,如何实现重新启动该程序???
procedure TForm1.NMFTP1Success(Trans_Type: TCmdType);
begin
case trans_type of
cmddownload:statusbar1.SimpleText:='download success';
cmdupload:statusbar1.SimpleText:='Upload success';
end;
end;//list button
procedure TForm1.BitBtn1Click(Sender: TObject);
var i:integer;
begin
screen.cursor:=crhourGlass;
try
nmftp1.parselist:=true;
nmftp1.Vendor:=NMOS_AUTO;
nmftp1.List;
finally
screen.cursor:=crdefault;
end;
end;//connect button
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
nmftp1.host:=edit3.text;
nmftp1.port:=strtoint(edit4.text);
nmftp1.timeout:=20000;
nmftp1.userid:=edit5.text;
nmftp1.password:=edit6.text;
nmftp1.connect;
end;//download button
procedure TForm1.BitBtn9Click(Sender: TObject);
begin
nmftp1.mode(mode_image);
nmftp1.Download('DTCARD.ASM','d:\download\DTCARD.ASM');
end;
procedure TForm1.NMFTP1Disconnect(Sender: TObject);
begin
if statusbar1 <>nil then
statusbar1.SimpleText:='Disconnected';
end;
procedure TForm1.NMFTP1Failure(var Handled: Boolean; Trans_Type: TCmdType);
begin
case trans_type of
cmddownload:statusbar1.SimpleText:='download failure';
cmdupload:statusbar1.SimpleText:='Upload failure';
end;
end;
end.
//list button
procedure TForm1.BitBtn1Click(Sender: TObject);
var i:integer;
begin
nmftp1.parselist:=true;
nmftp1.Vendor:=NMOS_AUTO;
nmftp1.List;
memo1.lines.assign(nmftp1.ftpdirectorylist.name);
end;
//connect button
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
nmftp1.host:=edit3.text;
nmftp1.port:=strtoint(edit4.text);
nmftp1.userid:=edit5.text;
nmftp1.password:=edit6.text;
nmftp1.connect;
end;
//download button
procedure TForm1.BitBtn9Click(Sender: TObject);
begin
nmftp1.mode(mode_image);
nmftp1.Download('DTCARD.ASM','d:\download\DTCARD.ASM');
end;
procedure TForm1.NMFTP1Failure(var Handled: Boolean; Trans_Type: TCmdType);
begin
case trans_type of
cmddownload:statusbar1.SimpleText:='download failure';
cmdupload:statusbar1.SimpleText:='Upload failure';
end;
end;procedure TForm1.NMFTP1Success(Trans_Type: TCmdType);
begin
case trans_type of
cmddownload:statusbar1.SimpleText:='download success';
cmdupload:statusbar1.SimpleText:='Upload success';
end;
end;
end.