Is it possible to save images using Visual Basic 2008
from URL to my PC?
For example : From www.domain.com/image.jpg
to C:\folder\image.jpg
P.S: I need simpliest example of the code, then I will edit is as I need.
Thanks.
Update : I want to know when the code have finished downloading of the image.
This is the simplest way I know.
Dim Client as new WebClient
Client.DownloadFile(Source, Destination)
Client.Dispose
This is superior to using the My.Computer.Network.DownloadFile method per Microsoft's documentation
"The DownloadFile method does not send optional HTTP headers. Some servers may return 500 (Internal Server Error) if the optional user agent header is missing. To send optional headers, you must construct a request using the WebClient class."
There's a simpler way:
My.Computer.Network.DownloadFile(Source, Desination)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With