procedure TForm1.Button1Click(Sender: TObject);
begin
ftpclient1.HostName:='10.183.72.4';
ftpclient1.UserName:='sxsy';
ftpclient1.PassWord:='';
if ftpclient1.Connect=true then
begin
showmessage('连接成功');
ftpclient1.LocalFileName:=extractfilepath(application.exename)+'10080310.EXE';
ftpclient1.Put; //不能在这里
end;
end;
应该在允许发送事件中写