473,320 Members | 1,848 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

axWebBrowser Save As ?

Hi,

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

Stan
Nov 20 '05 #1
7 3788
Cor
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
Nov 20 '05 #2
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.
"Cor" <no*@non.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP09.phx.gbl...
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

Nov 20 '05 #3
"Stan Sainte-Rose" <st**@cyber972.com> wrote in news:e7UDSeY5DHA.2540
@TK2MSFTNGP11.phx.gbl:
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

Nov 20 '05 #4
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

"Chad Z. Hower aka Kudzu" <cp**@hower.org> a écrit dans le message de
news:Xn*****************@127.0.0.1...
"Stan Sainte-Rose" <st**@cyber972.com> wrote in news:e7UDSeY5DHA.2540
@TK2MSFTNGP11.phx.gbl:
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

Nov 20 '05 #5
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" <an*******@discussions.microsoft.com> a écrit dans le message de
news:8B**********************************@microsof t.com...
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
HTH
ru

----- Stan Sainte-Rose wrote: -----

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

"Chad Z. Hower aka Kudzu" <cp**@hower.org> a écrit dans le message de
news:Xn*****************@127.0.0.1...
> "Stan Sainte-Rose" <st**@cyber972.com> wrote in news:e7UDSeY5DHA.2540
> @TK2MSFTNGP11.phx.gbl:
>> 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

>

Nov 20 '05 #6
Cor
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

"Stan Sainte-Rose" <st**@cyber972.com> schreef in bericht
news:%2****************@TK2MSFTNGP09.phx.gbl...
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" <an*******@discussions.microsoft.com> a écrit dans le message de
news:8B**********************************@microsof t.com...
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

HTH
ru

----- Stan Sainte-Rose wrote: -----

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

"Chad Z. Hower aka Kudzu" <cp**@hower.org> a écrit dans le message de news:Xn*****************@127.0.0.1...
> "Stan Sainte-Rose" <st**@cyber972.com> wrote in news:e7UDSeY5DHA.2540 > @TK2MSFTNGP11.phx.gbl:
>> 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
>


Nov 20 '05 #7
I got it ;-)
Thanks beaucoup :-)

Stan

"Cor" <no*@non.com> a écrit dans le message de
news:%2****************@TK2MSFTNGP12.phx.gbl...
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

"Stan Sainte-Rose" <st**@cyber972.com> schreef in bericht
news:%2****************@TK2MSFTNGP09.phx.gbl...
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" <an*******@discussions.microsoft.com> a écrit dans le message de
news:8B**********************************@microsof t.com...
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

HTH
ru

----- Stan Sainte-Rose wrote: -----

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

"Chad Z. Hower aka Kudzu" <cp**@hower.org> a écrit dans le

message de news:Xn*****************@127.0.0.1...
> "Stan Sainte-Rose" <st**@cyber972.com> wrote in news:e7UDSeY5DHA.2540
> @TK2MSFTNGP11.phx.gbl:
>> 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
>



Nov 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Matthias Kwiedor | last post by:
I have a aplication which hosts an axWebbrowser. This activex component needs about 10 to 15 mb of memory. Because i have a option to move the aplication to tray icon and do some timer work i...
0
by: David Thielen | last post by:
Hi; I have a form window that places an AxWebBrowser control in it and I can display html fine. However, I am now trying to print (and save and e-mail) the page. The following should, I believe,...
1
by: Pengyu | last post by:
Hi, I host an AxWebBrowser control in my program. How to save the web page shown in the control? Thank you very much! Pengyu
9
by: Djavdet | last post by:
Hi everyone, I need to work with web sites from my program but i don't need to show web site content.. I only need to get web page change something in html document and either move on or send...
0
by: Berry W | last post by:
Hi, I'm trying to capture hidden window's data that is in IE's AxSHDocVw.AxWebBrowser ActiveX control. If Control and window are visible, code below works but if Control and it's window is...
5
by: Thom Little | last post by:
I have a windows application that has an update form that uses AxWebBrowser to connect to a distribution site. This site uses a Response.Redirect to download of either a .msi file or a .zip file....
6
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the...
0
by: TeTe | last post by:
Hi I got problem with axwebbrowser + word. I'm opening Word document in AxWebBrowser and everything is OK until I run Word next to my App. Icons on taskbar are being disabled (in my App) and...
0
by: thirunavukarasukm | last post by:
Hai. I created one windows application.I am add reference control to add Microsoft WebBrowser Control..In my application I am using HTTPWebRequest and HttpWebResponse class .To request...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.