Hi guys, Could someone please tell me how this need to be done? I am trying to connect plain only with code, I don't need any logs or any other fancy things. I am trying to use "ASYNC" mode. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: procedure TfrmMain.icsFtpClientRequestDone(Sender: TObject; RqType: TFtpRequest; ErrCode: Word); begin // If error then close connection and exit; if ErrCode <> 0 then begin Display('Error #' + IntToStr(ErrCode)); //--> I got error in here because of the Display --> What is this display which is in example? if (icsFtpClient.Connected) then icsFtpClient.QuitAsync; Exit; end;
try case RqType of ftpOpenAsync: icsFtpClient.UserAsync; // Open successful ftpUserAsync: icsFtpClient.PassAsync; // User successful ftpPassAsync: icsFtpClient.CwdAsync; // Password successful ftpCwdAsync: icsFtpClient.TypeSetAsync; // CWD successful ftpTypeSetAsync: // Set type successful begin icsFtpClient.HostFileName := 'simtel40.gif'; icsFtpClient.LocalFileName := 'C:\simtel40.gif'; icsFtpClient.GetAsync; End; ftpGetAsync: QuitAsync; // --> Error here else Application.MessageBox('Unexpected RqType ' + IntToStr(Ord(RqType)), 'FTP', MB_OK); // --> Error here end; except on E:Exception do begin Application.MessageBox('*** ' + E.Message + ' ***', 'FTP', MB_OK); // --> Error here end; end; end; ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Best regards -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be