Our first Internet Transfer control example will examine and download files from the Microsoft ftp site, ftp.microsoft.com. This site contains a great deal of free software, readily available for downloading. All we have to do is to use the ftp protocol correctly. Let's name our new program FTPer, and let's have it display the files we download. This means that we'll download text files, so we set up FTPer to display the names of the available text files:
Users select from these listed text files; when they click, say, file2.txt, we download that file and display its contents:
Let's put this to work now. Use the Visual Basic Application Wizard to create a new SDI project (click the SDI option and not the MDI option) named FTPer. We'll need an Internet Transfer control, so select the Components item in Visual Basic's Project menu. Find the entry marked Microsoft Internet Transfer Control 5.0 and click it. We'll display the text of our text files in a rich text box, so add that control by clicking the Microsoft Rich Textbox Control 5.0 entry; then click OK.
Now open the main form of the project, frmMain, and add an Internet Transfer control (Inet1), a rich text box (RichTextBox1), and a Listbox control (List1) for the names of the text files:
At this point, we're ready to begin coding the FTPer program.