VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2400
   ClientLeft      =   48
   ClientTop       =   432
   ClientWidth     =   3744
   LinkTopic       =   "Form1"
   ScaleHeight     =   2400
   ScaleWidth      =   3744
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   732
      Left            =   1800
      TabIndex        =   0
      Top             =   840
      Width           =   1092
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
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 Sub command1_click()

    Dim errcode As Long
    Dim url As String
    Dim localFileName As String
    
    'WHAT FILE TO DOWNLOAD?
    url = "http://pc.co.il/_uploads/extraimg/gindis(1).jpg"
    'WHERE TO SAVE IT?
    localFileName = "c:\gindis(1).jpg"
    
    errcode = URLDownloadToFile(0, url, localFileName, 0, 0)
    If errcode = 0 Then
        MsgBox "Download finished and saved to: " & localFileName
    Else
        MsgBox "Error while downloading"
    End If

End Sub
