|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Can't get the Internet Transfer Control to workserver via HTTP. The code to send the request is: AxInet1.Execute("http://www.thewebsite.com/thefile.zip", "GET", "", "") And the code to handle the response event is: Private Sub AxInet1_StateChanged(ByVal sender As Object, ByVal e As AxInetCtlsObjects.DInetEvents_StateChangedEvent) Handles AxInet1.StateChanged Dim vtData As Object Dim intFile As Integer intFile = FreeFile() If (e.state = InetCtlsObjects.StateConstants.icResponseReceived) Then FileOpen(intFile, "thefile.zip", OpenMode.Binary, OpenAccess.Write) vtData = AxInet1.GetChunk(1024, InetCtlsObjects.DataTypeConstants.icByteArray) Do While Len(vtData) > 0 FilePutObject(intFile, vtData) vtData = AxInet1.GetChunk(1024, InetCtlsObjects.DataTypeConstants.icByteArray) Loop FilePutObject(intFile, vtData) FileClose(intFile) End If End Sub I get the "response received" event, but when I call the first "GetChunk", it just gets stuck there. What am I doing wrong? Thanks in advance for any suggestions. "Franco" <cumin***@yahoo.com> schrieb: I suggest to use 'System.Net.WebClient' instead, which has a 'DownloadFile' > I'm using VB 2005. I want to use the Inet control to get a file from a > server via HTTP. method. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
You're good if you can answer this one.....
for each on multiple collections Problem with access database, and VB .NET Office application object problem Microsoft Visual Studio 2005 Tools for Applications Changing Printer's default paper Extracting icon from file: most efficient method? Parse bookmarks in a word document Does a menu item lose dataset information? time constant |
|||||||||||||||||||||||