Internet Transfer Control can be used to send and retrieve documents across the net. This control uses File Transfer Protocol (FTP) and Hypertext Transfer Protocol (HTTP). Using FTP, the user can send and retrieve files from any system connected to the Internet. Users can perform actions such as rename and delete files, create and remove directories, etc. ITC is a very handy control for the VB programmers. Basically, Internet is used for transferring data and ITC helps programmers to utilize Internet in a better way. All of the functionality of ITC is implemented through it's methods, and it requires no interface.
ITC supports both synchronous and asynchronous transfers. In synchronous transfer, you can make the system wait until the transfer is complete and in asynchronous transfer, the system can work as usual while at the back end the file is transferred. ITC has many methods and properties which we can not discuss here in detail, you can refer to MSDN for complete documentation.
I will show you how to create and test this component in steps which will make it easier for you to understand the functionality. Through out the article, I will discuss methods and properties used in the component.
Step 1: Creating the project
Start a new "ActiveX DLL" project. Assign a valid name
to the project, I have named it "HTTP".
Assign a name to the class module. I have named the class "DLoad".
Step 2: Adding a form
Add a form to the current ActiveX project. This step was necessary so that we could place the Internet Transfer Control on a form. Through this form, we will access the control's methods and properties. I have done this to make programming simpler and it would be much easier for the beginners to understand and use the control. Remember, we could have accessed the control directly in the DLL project and accessed it's methods but to keep the task simpler, I have included a form to place the ITC on.
Comments