FTP_Progress

4D - Documentation   Français   English   German   4D Internet Commands, Theme List   4D Internet Commands, Alphabetical List   Back   Previous   Next

version 6.5


FTP_Progress (left; top; windowTitle; thermoText; cancel) Integer

ParameterTypeDescription
leftIntegerLeft window coordinate
topIntegerTop window coordinate
windowTitleStringThermometer Window Title
thermoTextStringText above thermometer progress
cancelStringCancel button text
Function resultIntegerError Code

Description

The command FTP_Progress defines window coordinates and dialog box text for the FTP progress indicator. The progress indicator can appear during calls to FTP_Send, FTP_Append or FTP_Receive. The FTP_Progress command does not display the progress window itself, it only defines the windows characteristics for when it is displayed by the send and receive commands. Both FTP_Send, FTP_Append and FTP_Receive have parameters which can show or hide the progress window.

The progress window will automatically close upon completion of a file transfer. If for some reason the size of the file being sent or received cannot be determined, the thermometer will be displayed as a barber pole and the file size will be displayed as "unknown".

left is the coordinates of the left side of the thermometer progress window. If left is -1, the window will be centered horizontally on the screen.

top is the coordinates of the top side of the thermometer progress window. If top is -1, the window will be centered vertically on the screen.

windowTitle is the title of the thermometer progress window. In the following example, the window title is "Getting '/pub/CGMiniViewer.hqx'" If windowTitle is a null string, the window will have no title.

thermoText is the text to be displayed above the progress thermometer. If thermoText is "*" then the text will be the default. In the following example, thermoText is "Receiving File: /pub/CGMiniViewer.hqx". The default text for the thermometer is the status text of the transfer process, sent by the host. This text changes as the connection goes through the different stages of the transfer process.

cancel is the text of the Cancel button. If cancel is a null string, the Cancel button will be hidden. If cancel is "*", the text will be the default text, which is "Cancel".

Example

   $error:=FTP_Progress (-1;-1;"Getting '/pub/CGMiniViewer.hqx'";"*";"*")
   Case of 
      : (FTP_Login ("ftp.4d.com";"anonymous";"dbody@aol.com";vFTP_ID;vFTP_Msg)#0)
      : (FTP_Receive (vFTP_ID;"/pub/CGMiniViewer.hqx";"HardDrive:Docsƒ:4D";1)#0)
      : (FTP_Logout (vFTP_ID)#0)
   Else
      $OK:=True   `all commands executed without error
   End case 

4D - Documentation   Français   English   German   4D Internet Commands, Theme List   4D Internet Commands, Alphabetical List   Back   Previous   Next