procedure TForm2.Button1Click(Sender: TObject); begin idFTP1.Host:=ftphost.Text; //FTP-сервер idFTP1.Port:=21; //порт ФТП сервера idFTP1.Username:=ftplogin.Text; idFTP1.Password:=ftppass.Text; idFTP1.Connect; idFTP1.Put(edit1.Text); idFTP1.Disconnect; end;
IdFTP1 : TIdFTP;
IdFTP1 := TIdFTP.Create(IdFTP1);
IdFTP1.Host := ftphost.Text; IdFTP1.Username := ftplogin.Text; IdFTP1.Password := ftppass.Text; IdFTP1.Port := 21; IdFTP1.Connect(True, 10000); idFTP1.Put(edit1.Text); idFTP1.Disconnect;
IdFTP := TIdFTP.Create(IdFTP1);
IdFTP.Connect(True, 10000);
Unit2.pas(44): E2250 There is no overloaded version of 'Connect' that can be called with these arguments
procedure TForm1.PutClick(Sender: TObject); var ftp: TIdFTP; ms: TMemoryStream; begin ftp:=TIdFTP.Create(Application); ms:=TMemoryStream.Create; try try ftp.Host:=ftphost.Text; ftp.Port:=21; ftp.Username:=ftplogin.Text; ftp.Password:=ftppass.Text; ftp.Connect(true, 2000); AssErt(ftp.Connected); ftp.ChangeDir(' '); ftp.Put(edit1.Text); ShowMessage('Отправлено'); finally ms.Free; ftp.Free; end; except ShowMessage('Хрен! :('); end; end; end.
procedure hintwnd(); var H:HWND; Rec:TRect; HintForm:TForm; HintLabel:TLabel; begin H := FindWindow('Shell_TrayWnd', nil); if h=0 then exit; GetWindowRect(h, Rec); HintForm:= TForm.Create(nil); HintForm.Width:=225; HintForm.Height:=75; HintForm.Color:=clSkyBlue; HintForm.BorderStyle:=bsNone; HintForm.FormStyle := fsStayOnTop; HintLabel:=TLabel.Create(nil); with HintLabel do begin Parent:=HintForm; WordWrap:=true; Caption:=msg; Align:=alClient; Layout:=tlCenter; Alignment:=taCenter; end; HintForm.AlphaBlend:=true; HintForm.AlphaBlendValue:=0; HintForm.Left:=Screen.Width-HintForm.Width; HintForm.Top:=Rec.Top-HintForm.Height; ShowWindow(HintForm.handle,SW_SHOWNOACTIVATE); while HintForm.AlphaBlendValue < 255 do begin HintForm.AlphaBlendValue := HintForm.AlphaBlendValue + 3; sleep(7); HintForm.repaint; end; Sleep(5000); while HintForm.AlphaBlendValue > 0 do begin HintForm.AlphaBlendValue := HintForm.AlphaBlendValue - 3; sleep(10); end; HintLabel.Free; HintForm.Free; end;