axWebBrowser Save As ?

  • Thread starter Thread starter Stan Sainte-Rose
  • Start date Start date
S

Stan Sainte-Rose

Hi,

How can I save a page loaded with AxWebBrowser into a winform as an htm page
?

Stan
 
Hi Stan,

You can use mshtml for that.

You have to set an reference but do not set an import because than your
program become terrible slow while editing. Just reference it everytime you
use the object (goes also terrible slow)

But a page from a AxWebBrowser is not a htm page, it is a collection of htm
pages.

You have to use the documentcomplete event for it and than use the e.pDisp

You have to cast it before placing it in the collection to
ShdocVW.Webbrowser.

I hope this helps?

Cor
How can I save a page loaded with AxWebBrowser into a winform as an htm
page
 
Hi Cor,

Thanks for your post.
Do you know where I can find more documentation about mshtml ?
I just need to save a page with the different graphics in local drive.
By the way what do you mean by "set an reference but do not set an import "
(my english is not really fluent..)

Stan.
 
Stan Sainte-Rose said:
Thanks for your post.
Do you know where I can find more documentation about mshtml ?
I just need to save a page with the different graphics in local drive.
By the way what do you mean by "set an reference but do not set an import "

You might find it easier to bypass the HTML display control and just use the
HTTP protocol directly to grab the page and images.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
Hi,
It's okay for the mshtml control,
I can read the code, but I don't know how to save the images into my local
directory.
Any idea ?

Stan
 
Hi,
I want to save only the pictures.
I use this code to parse them
Dim htImg As mshtml.HTMLImg
For Each htImg In AxWebBrowser1.Document.images
console.writeline( htImg.src) ' url
console.writeline(htImg.nameProp) ' FileName
Next

But I don't know how to individually save them

Stan




ru said:
If you have a AxWebBrowser control on your form, you can save the page like this:

Browser.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVEAS, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT)

You'll be prompted with a savefiledialog, and it wiil save the page and
put the pictures in a different folder named Filename_files
 
Hi Stan,

You can better use the "webclient.dowloadfiles" to get those pictures,
that is very (even more simple than get a file from a disk)

Cor
 
I got it ;-)
Thanks beaucoup :-)

Stan



Cor said:
Hi Stan,

You can better use the "webclient.dowloadfiles" to get those pictures,
that is very (even more simple than get a file from a disk)

Cor

message set
 
Back
Top