all groups > dotnet windows forms > august 2005 >
You're in the

dotnet windows forms

group:

HTMLElement reference object


HTMLElement reference object JT Thompson
8/31/2005 6:58:02 PM
dotnet windows forms:
I can't seem to get the HTMLElement class to reference an object

When I try:
Dim HtmlElement1 As New HtmlElement
I get a "type ... has no constructors"

When I try:
Dim HtmlElement1 As HtmlElement
and I try to hook into it's click event it throws an exception of:
System.NullReferenceException: Object reference not set to an instance of an
object.

So how do I reference a html page in the webbrowser to the HtmlElement class?


RE: HTMLElement reference object JT Thompson
8/31/2005 8:07:01 PM
I found it:

Dim HtmlElement1 As HtmlElement
HtmlElement1 = webbrowser1.document.body

This did the trick.

[quoted text, click to view]
AddThis Social Bookmark Button