In this tutorial i will show you how to get a file of the web with "Microsoft internet Transfer Control" Author: Geimas5 Date: 25.okt.05 difficulty: Easy Language: Visual Basic start of by making a new Standard Project in vb create: 2, textbox 1, command button 1, Microsoft Internet Transfer Control name them: 1st textbox: txtOutput 2nd textbox: txtURL Commandbutton: cmdGet inet: inetGet now add the code: Option Explicitthis is a code that will prevent variables and such from being created without proper declaration!! its not in very much use in Small projects but will decries debugging time significantly on bigger projects, and i think its best to start early with this. now we need to add a event to the commandbutton: Private Sub cmdGet_Click()this will allow us to execute code that is between those two lines then someone clicks the button now the part of this tutorial that is what this tutorial is all about: txtOutput.Text = inetGet.OpenURL(txtURL.Text, icString)here you see that the "Microsoft Internet Transfer Control" has the syntax: OpenURL(url ,datatype) *the data type is optional in this tutorial we used the icString datatype but you can alsow use icByteArray and this will recive the data as a byte array. while the icString will recive the data as String(figurs right?) if you still have questions then check out the attachment. well hope this sums it up happy coding!! |
discuss this topic to forum
