You can download the html content to a local file on the hard drive or other place.
Now you lookup the html file and download all the images to the same directory or sub-directory. The hard part is that you now need to modify the html so it will load the local stored images. This can be done with the String methods and/or Regex.
You must search the html content for the image tag (<img) and get the url of it. The url /images/top.gif will be the full folder url to the html page with this part appended to it. So, if you have the html page: http://www.bankbuddyonline.nl/index.html You will find one image tag with the src attribute set to Images/bbo.gif. When you want to grap that image you need to download it with the full url and that would be http://www.bankbuddyonline.nl/Images/bbo.gif.
Enjoy your school and lett us know when it worked out or you need any help!
He saves all the images and text like an .doc file...
When the webbrowser finish loading the webpage... and shows the webpage with all her images.. he must save somewhere the data.. a file or stream or memory stream.
cast the ActiveXInstance property of the webbrowser control to an instance of Internet explorer. And invoke the OLE Automation method ExecWB passing the "Save As" constant with the prompt user option. you can pass an empty string for the path as you are prompting the user for it.
webBrowser
Blast
gsm
but can you explain please the code
Scott Sackville
add COM reference to Microsoft Internet Controls. . .
use this code:
Daniel Jakobsson
Thanks again to all that are helping me!!
barkingdog
You can download the html content to a local file on the hard drive or other place.
Now you lookup the html file and download all the images to the same directory or sub-directory.
The hard part is that you now need to modify the html so it will load the local stored images. This can be done with the String methods and/or Regex.
Claudio Cannatella
You must search the html content for the image tag (<img) and get the url of it. The url /images/top.gif will be the full folder url to the html page with this part appended to it.
So, if you have the html page: http://www.bankbuddyonline.nl/index.html
You will find one image tag with the src attribute set to Images/bbo.gif. When you want to grap that image you need to download it with the full url and that would be http://www.bankbuddyonline.nl/Images/bbo.gif.
Enjoy your school and lett us know when it worked out or you need any help!
Obi Joe Kenobi
He saves all the images and text like an .doc file...
When the webbrowser finish loading the webpage... and shows the webpage with all her images.. he must save somewhere the data.. a file or stream or memory stream.
RSDEVELOPER
I managed to save the html content in a memory stream...
and created a .html file. It worked but no images..
What i dont know is how can i download a image
lest say that in my html file i have this:
<img src="/images/top.gif"> how will i be able to download this image
Syeda Rizvi
cast the ActiveXInstance property of the webbrowser control to an instance of Internet explorer. And invoke the OLE Automation method ExecWB passing the "Save As" constant with the prompt user option. you can pass an empty string for the path as you are prompting the user for it.
http://msdn.microsoft.com/library/default.asp url=/workshop/browser/webbrowser/reference/Methods/ExecWB.asp
http://msdn.microsoft.com/library/default.asp url=/library/en-us/com/html/ae1592b6-2afd-4379-a18e-d46b226bc9e2.asp
http://msdn.microsoft.com/library/default.asp url=/library/en-us/com/html/6245725e-51d4-40e1-8cf1-a65657e790ef.asp
Download and run the code here
MarkAx