VB Code:
Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As _
String, ByVal szFileName As String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long
Private Function DownloadFile(URL As String, _
LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
Private Sub ListView1_DblClick()
DownloadFile "http://www.mypage.com/myfile.dat", "c:\myfile.dat")
If Not DownloadFile then
MsgBox "File could not be downloaded", vbInformation
Exit Sub
End If
Open "C:\myfile.dat" For Input As #1
Text1.Text = Input(LOF(1), 1)
Close #1
End Sub