1,105,633 Community Members

Inet control handling

Member Avatar
Junior Poster in Training
63 posts since Dec 2006
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
Dim strURL As String
Dim bData() As Byte
Dim intFile As Integer

strURL = "http://localhost/aaa/1/3/test1.jpg"
intFile = FreeFile()      ' Set intFile to an unused file.
bData() = Inet1.OpenURL(strURL, icByteArray)

Do Until Inet1.StillExecuting = False ' WAIT DOWNLOADING...
Open "C:\test1.jpg" For Binary Access Write As #intFile      
      Put #intFile, , bData()
Close #intFile

Is there a way to to validate or identify first if the URL is existing or valid.

I'm writing a program that will download a file from the website but before downloading the file, I want to make sure that the file exist and do something else...

This article has been dead for over three months: Start a new discussion instead
Start New Discussion
Tags Related to this Article