| Downloading Files | ||
|
The GetFile method may be used after connecting to an FTP or HTTP server with the Connect method. The GetMultipleFiles method may only be used with an FTP server. In the following Visual Basic example, an instance of the File Transfer control has been placed on a form. The form also contains edit controls for server name, port, user name, password, remote file, and local file. In addition, there is an array of three option controls used to select the server type. The server type is initialized in the Form_Load event. The indices 0,1,2 correspond to the possible values for the ServerType property. There is also a check box used to select whether SSL Authorization is to be used for a secure FTP server. The Options property is initialized in the Form_Load event. If the Server Type is left undefined, then the control will try to infer the type from the port number.
The code for the "Download" button reads the edit controls, connects to a server (FTP or HTTP), downloads a file, and disconnects:
|
||
|
Copyright © 2008 Catalyst Development Corporation. All rights reserved. |
||