4D v13.2

FTP_Progress

Home

 
4D v13.2
FTP_Progress

FTP_Progress 


 

FTP_Progress ( left ; top ; windowTitle ; thermoText ; cancel ) -> Function result 
Parameter Type   Description
left  Integer in Left window coordinate
top  Integer in Top window coordinate
windowTitle  String in Thermometer Window Title
thermoText  String in Text above thermometer progress
cancel  String in Cancel button text
Function result  Integer in Error Code

The FTP_Progress command 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

Note: For more information about this particular use of the Case of structure, please refer to Appendix A, Programming Tips.

 
PROPERTIES 

Product: 4D
Theme: IC File Transfer
Number: 88946

 
INDEX

Alphabetical list of commands

 
HISTORY 

Created: 4D Internet Commands 6.5