AxWebBrowser - a monster!

  • Thread starter Thread starter Don Juan
  • Start date Start date
D

Don Juan

I have had a terrible 10 days period with AxWebBrowser ActiveX Control.
I can't understand why there is no goog documentation and tutorials for
that monster.
 
Don Juan,

It's simply the WebBrowser control, and there is a ton of documentation
on it. Where are you looking? Have you done a search on MSDN for
WebBrowser?
 
Dear Nicholas,

I am seeking for help on my AxWebBrowser. Any site give me all the event
and properties provided by AxWebBrowser? One problem I would like to solve
is that how to capture all the item name(e.g. image, paragraph) in the
browser(AxWebBrowser in my windows form), so that I can parse the items into
text form one by one.

THanks.

Jason

Nicholas Paldino said:
Don Juan,

It's simply the WebBrowser control, and there is a ton of documentation
on it. Where are you looking? Have you done a search on MSDN for
WebBrowser?

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Don Juan said:
I have had a terrible 10 days period with AxWebBrowser ActiveX Control.
I can't understand why there is no goog documentation and tutorials for
that monster.
 
JasonChoi said:
Dear Nicholas,

I am seeking for help on my AxWebBrowser. Any site give me all the event
and properties provided by AxWebBrowser? One problem I would like to
solve
is that how to capture all the item name(e.g. image, paragraph) in the
browser(AxWebBrowser in my windows form), so that I can parse the items
into
text form one by one.

You can do this through the MSHTML DOM (Document Object Model). You will
need to set a reference to the Microsoft.mshtml PIA (Primary Interop
Assembly). The DOM is fairly well documented on MSDN.

Tim
Read my tech blog:
http://www.itwriting.com/blog
 
Dear Tim,

Thanks for your prompt reply. I got a very good starting because of your
guide. It is really what I seek for. I spent a whole day to study the
article related to MSHTML DOM (Document Object Model), I am clear with it.
However, I still find difficulties in doing my thing.

1) I can't find mshtml.dll in my computer, I failed to add this component in
my VB.NET 2003. Where can I get the component?
2) Ariticle taught me how to capture tag name from HTML document by using
javascript, but no article taught how to use VB.NET to capture the document
items.

Could you give me more hints or suggestion? Many thanks.
Jason
 
JasonChoi said:
Dear Tim,

Thanks for your prompt reply. I got a very good starting because of your
guide. It is really what I seek for. I spent a whole day to study the
article related to MSHTML DOM (Document Object Model), I am clear with
it.
However, I still find difficulties in doing my thing.

1) I can't find mshtml.dll in my computer, I failed to add this component
in
my VB.NET 2003. Where can I get the component?

Add a reference to the COM "Microsoft HTML object library".
2) Ariticle taught me how to capture tag name from HTML document by using
javascript, but no article taught how to use VB.NET to capture the
document
items.

You can cast the Document property of the ActiveX WebBrowser to an object of
type IHTMLDocument2. This gives access to the MSHTML DOM.

Tim
Read my tech blog:
http://www.itwriting.com/blog
 
Dear Tim,

I still not find the 2003Microsoft HTML object library component in
"Add/Remove Items" --> ".NET Framework Component" tab in my VB.NET 2003. How
can I add it to my platform?

One more question, are you sure MSHTML Object can be programmed with VB.NET?
I find the information related to the object always mentions to use C/C++.

Thanks.
Jason
 
JasonChoi said:
Dear Tim,

I still not find the 2003Microsoft HTML object library component in
"Add/Remove Items" --> ".NET Framework Component" tab in my VB.NET 2003.
How
can I add it to my platform?

It is a COM component, so you will find it in the COM tab in the Add
reference dialog. To get the Add Reference dialog, right-click the project
name in the solution explorer and choose Add Reference...
One more question, are you sure MSHTML Object can be programmed with
VB.NET?
I find the information related to the object always mentions to use C/C++.

The documentation is primarily for C/C++ but there is also a "scripting"
API. Through COM interop most of the API can be used though there are some
difficult cases where the interop library doesn't work as it should. I doubt
you will run into these for what you want to do.

There's a C# example of COM interop with MSHTML here:

http://www.itwriting.com/htmleditor/index.php

Tim
Read my tech blog:
http://www.itwriting.com/blog
 
Thanks for helpful comment, what is the main different between IHTMLDocument2
and IHTMLDocument?

Jason CHoi
 
Thanks you all.
Now, I try to program a navigation by up-arrow and down-arrow key to read
the element on the webpage one by one, but I receive error when I create a
KeyPress event for my AxWebBrowser. Any wrong with me? Any suggestion?
Thanks.

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top