Kan någon förklara hur jag ska göra för att tex. ladda ner http://www.google.se/images/hp0.gif högerklicka påbilden och välj "spara som" och välj var du vill spara filen Hittade detta exempel.Hur laddar man ner en bild från Internet?
till en viss mapp på min dator?Sv: Hur laddar man ner en bild från Internet?
Sv: Hur laddar man ner en bild från Internet?
How to Download a exe to my Drive
How to Download a exe to my Drive
Where can i find a code to do this
Hi i have this code to download a picture from the net
Private Sub Command1_Click()
Call GetInternetFile(Inet1, "" + Text1 + "", "c:\temp")
End Sub
Public Sub GetInternetFile(Inet1 As Inet, myURL As String, DestDIR As String)
' Written by: Blake Pell
'Label1.Caption = "Starting"
On Error GoTo XCB
Dim myData() As Byte
RealFile$ = "test.jpg"
If Inet1.StillExecuting = True Then Exit Sub
myData() = Inet1.OpenURL(myURL, icByteArray)
For X = Len(myURL) To 1 Step -1
If Left$(Right$(myURL, X), 1) = "/" Then RealFile$ = Right$(myURL, X - 1)
Next X
myFile$ = DestDIR + "\" + RealFile$
Open myFile$ For Binary Access Write As #1
Put #1, , myData()
Close #1
'End
Label1.Caption = "Getting if no error"
On Error GoTo Cvds
Picture1.Picture = LoadPicture("c:\test.jpg")
Cvds:
Label1.Caption = "Got Picture"
Form1.Timer1.Enabled = True
Inet1.Cancel
XCB:
Exit Sub
End Sub
Works great, i can download with out the Saveas dialog poping up, i tried to download a exe the same way and it would not work anyone no why, and if they no where to find
a code to download a exe to my drive just like i do with
downloading pictures.
Thank You