I would like to download a picture (.gif )from the net to my app. The reason is that the app needs to use different pictures for every day. I guess that could be done with the Inet-object, but how?
Suggestions?
Printable View
I would like to download a picture (.gif )from the net to my app. The reason is that the app needs to use different pictures for every day. I guess that could be done with the Inet-object, but how?
Suggestions?
You can modify it to suite your needs.Code:Dim iFile As Integer
Dim bBIN() As Byte
bBIN = Inet1.OpenURL("www.mysite.com/images/image1.gif", icByteArray)
iFile = FreeFile
Open "C:\image1.gif" For Binary Access Write As iFile
Put #iFile, , bBIN
Close iFile
'load the picture
Picture1.Picture = LoadPicture("C:\image1.gif")
Gl,
D!m
just put a combo box hidden somewhere in the program and put the URL in it.
Private Sub Form_Load
WebBrowser1.Navigate Combo1.Text
End
Well if you don't NEED to download them...then you can use
andymannewbie's idea...but instead of the webbrowser control use the picture box. Because when loading images into the webbrowser control you will be faced with getting rid of scroll bars and rezising. But if you need to have animated gifs going then i would recomend loading them into a gif control that you can get...here...
Gl,
D!m
The thing is that I do save the image in a file at the moment. I would like to skip that part and load the image directly into the app. Well, I'll try the browser-idea.
Thanks for the answers!
Guys I need your help with the same thing.
I load my picture with the webbrowser control as shown:
WebBrowser1.Navigate ("www.anysite.com/images/logo.gif")
the picture is displayed fine in my form but How can I save the picture in my c:\ drive ?