From: kimiraikkonen on
Hi Steve,
Yes, if i use this syntax, intellisense recognizes every object with no
problem.
Dim x As HtmlDocument = WebBrowser1.Document
AddHandler x.MouseOver, AddressOf Me.DisplayHyperlinks


But if i use in this way, it doesn't show "Document" property just after
"Webbrowser1"(it's impatient that it expects an event), though that code is
compiled and it works as it should:

AddHandler kimibrowser.Document.MouseOver, AddressOf Me.DisplayHyperlinks

Thanks for the care,

Onur Güzel
--
Best regards,

Onur Güzel
kimiraikkonen85(a)hotmail.com


"Steve Gerrard" wrote:

> kimiraikkonen wrote:
>
> > Shortly:
> > "AddHandler webbrowser1.Document.MouseOver, AddressOf
> > Me.DisplayHyperlinks"
> >
> > ...that syntax claims no error when it's built / compiled, but
> > IntelliSense doesn't recognize "Document" after "webbrowser1" object.
> >
> > Why?
> >
>
> It does on my machine. Me.WebBrowser1.Document comes right up. Something else
> not compiling correctly?
>
>
>
From: kimiraikkonen on
Yeah, a straight code like:

Me.Webbrowser1.Document... has also no recognition problem by Intellisense
on my machine,too.

The problem with Intellisense was the syntax i was using:
AddHandler webbrowser1.Document.MouseOver, AddressOf Me.DisplayHyperlinks


Thanks,

Onur Güzel

--
Best regards,

Onur Güzel
kimiraikkonen85(a)hotmail.com


"Steve Gerrard" wrote:

> kimiraikkonen wrote:
>
> > Shortly:
> > "AddHandler webbrowser1.Document.MouseOver, AddressOf
> > Me.DisplayHyperlinks"
> >
> > ...that syntax claims no error when it's built / compiled, but
> > IntelliSense doesn't recognize "Document" after "webbrowser1" object.
> >
> > Why?
> >
>
> It does on my machine. Me.WebBrowser1.Document comes right up. Something else
> not compiling correctly?
>
>
>
From: Lloyd Sheen on

"kimiraikkonen" <kimiraikkonen85(a)gmail.com> wrote in message
news:2fe0281b-107b-434f-b6df-61a01310effc(a)m44g2000hsc.googlegroups.com...
Hi there,
I needed to use MouseOver event on Webbrowser which is NOT provided by
webbrowser control natively(what a disappointment), so i decided to go
with another route to simulate this like:


////////////////////////////////////////////////
Public Sub DisplayHyperlinks(ByVal sender As Object, ByVal e As
System.Windows.Forms.HtmlElementEventArgs)

' My codes here

End Sub

Private Sub webbrowser1_DocumentCompleted(ByVal sender As
System.Object, ByVal e As
System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles
webbrowser1.DocumentCompleted

' Here is my question
' Although intellisense doesn't recognize "Document", but i'm still
able to compile
' and use this addhandler syntax without any build or runtime errors
AddHandler webbrowser1.Document.MouseOver, AddressOf
Me.DisplayHyperlinks

End Sub
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Shortly:
"AddHandler webbrowser1.Document.MouseOver, AddressOf
Me.DisplayHyperlinks"

....that syntax claims no error when it's built / compiled, but
IntelliSense doesn't recognize "Document" after "webbrowser1" object.

Why?

I hope i have explained enoug clear,
Thanks,

Onur G�zel

Finally got a chance to test this and I do not see the problem you describe.

The app I used to test is one that takes a list of URL's and in a tabcontrol
, creates a new tabpage, a new WebBrowser, and then adds the WebBrowser to
the tabpage and the tabpage to the tabcontrol.

My code is (for the webbrowser) is just

Dim wc As New WebBrowser

Now when I type

AddHandler wc. (now I get document) . and I get a list of not just events
but properties and functions as well.

I can select MouseOver from the list and all is good.

I am using VS 2008 Pro.

LS

From: kimiraikkonen on
Hi Lloyd,
I'm using VB 2005 express and i placed Webbrowser control from toolbox into
my form, and it doesn't recognize Document property if i use it in a
"Addhandler" syntax.

Addhandler webbrowser.<i don't get Document, it expects an event as
well>.MouseOver,AddressOf Me.DisplayHyperlinks

As you're using VS 2008, maybe that may have been fixed in 2008 or you need
to place Webbrowser control to your form instead of manually creating
WebBrowser instance.

And of course when i use Webbrowser1 object elsewhere like in a sub or in a
button1.click event there's no problem with intellisense

Webbrowser1.Document.members...... (no problem)

The problem was recognizing Document property of Webbrowser within Addhandler.

Plus, Steve's suggestion worked to make Webbrowser recognize all the objects:
Dim x As HtmlDocument = WebBrowser1.Document
AddHandler x.MouseOver, AddressOf Me.DisplayHyperlinks

Thanks,

Onur
--
Best regards,

Onur Güzel
kimiraikkonen85(a)hotmail.com


"Lloyd Sheen" wrote:

>
> "kimiraikkonen" <kimiraikkonen85(a)gmail.com> wrote in message
> news:2fe0281b-107b-434f-b6df-61a01310effc(a)m44g2000hsc.googlegroups.com...
> Hi there,
> I needed to use MouseOver event on Webbrowser which is NOT provided by
> webbrowser control natively(what a disappointment), so i decided to go
> with another route to simulate this like:
>
>
> ////////////////////////////////////////////////
> Public Sub DisplayHyperlinks(ByVal sender As Object, ByVal e As
> System.Windows.Forms.HtmlElementEventArgs)
>
> ' My codes here
>
> End Sub
>
> Private Sub webbrowser1_DocumentCompleted(ByVal sender As
> System.Object, ByVal e As
> System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles
> webbrowser1.DocumentCompleted
>
> ' Here is my question
> ' Although intellisense doesn't recognize "Document", but i'm still
> able to compile
> ' and use this addhandler syntax without any build or runtime errors
> AddHandler webbrowser1.Document.MouseOver, AddressOf
> Me.DisplayHyperlinks
>
> End Sub
> \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
>
> Shortly:
> "AddHandler webbrowser1.Document.MouseOver, AddressOf
> Me.DisplayHyperlinks"
>
> ....that syntax claims no error when it's built / compiled, but
> IntelliSense doesn't recognize "Document" after "webbrowser1" object.
>
> Why?
>
> I hope i have explained enoug clear,
> Thanks,
>
> Onur Güzel
>
> Finally got a chance to test this and I do not see the problem you describe.
>
> The app I used to test is one that takes a list of URL's and in a tabcontrol
> , creates a new tabpage, a new WebBrowser, and then adds the WebBrowser to
> the tabpage and the tabpage to the tabcontrol.
>
> My code is (for the webbrowser) is just
>
> Dim wc As New WebBrowser
>
> Now when I type
>
> AddHandler wc. (now I get document) . and I get a list of not just events
> but properties and functions as well.
>
> I can select MouseOver from the list and all is good.
>
> I am using VS 2008 Pro.
>
> LS
>
>
From: Lloyd Sheen on

"kimiraikkonen" <kimiraikkonen(a)discussions.microsoft.com> wrote in message
news:4B04589B-DE86-42BB-ABEA-FFECFF7A1ABC(a)microsoft.com...
> Hi Lloyd,
> I'm using VB 2005 express and i placed Webbrowser control from toolbox
> into
> my form, and it doesn't recognize Document property if i use it in a
> "Addhandler" syntax.
>
> Addhandler webbrowser.<i don't get Document, it expects an event as
> well>.MouseOver,AddressOf Me.DisplayHyperlinks
>
> As you're using VS 2008, maybe that may have been fixed in 2008 or you
> need
> to place Webbrowser control to your form instead of manually creating
> WebBrowser instance.
>
> And of course when i use Webbrowser1 object elsewhere like in a sub or in
> a
> button1.click event there's no problem with intellisense
>
> Webbrowser1.Document.members...... (no problem)
>
> The problem was recognizing Document property of Webbrowser within
> Addhandler.
>
> Plus, Steve's suggestion worked to make Webbrowser recognize all the
> objects:
> Dim x As HtmlDocument = WebBrowser1.Document
> AddHandler x.MouseOver, AddressOf Me.DisplayHyperlinks
>
> Thanks,
>
> Onur
> --
> Best regards,
>
> Onur Güzel
> kimiraikkonen85(a)hotmail.com
>
>
> "Lloyd Sheen" wrote:
>
>>
>> "kimiraikkonen" <kimiraikkonen85(a)gmail.com> wrote in message
>> news:2fe0281b-107b-434f-b6df-61a01310effc(a)m44g2000hsc.googlegroups.com...
>> Hi there,
>> I needed to use MouseOver event on Webbrowser which is NOT provided by
>> webbrowser control natively(what a disappointment), so i decided to go
>> with another route to simulate this like:
>>
>>
>> ////////////////////////////////////////////////
>> Public Sub DisplayHyperlinks(ByVal sender As Object, ByVal e As
>> System.Windows.Forms.HtmlElementEventArgs)
>>
>> ' My codes here
>>
>> End Sub
>>
>> Private Sub webbrowser1_DocumentCompleted(ByVal sender As
>> System.Object, ByVal e As
>> System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles
>> webbrowser1.DocumentCompleted
>>
>> ' Here is my question
>> ' Although intellisense doesn't recognize "Document", but i'm still
>> able to compile
>> ' and use this addhandler syntax without any build or runtime errors
>> AddHandler webbrowser1.Document.MouseOver, AddressOf
>> Me.DisplayHyperlinks
>>
>> End Sub
>> \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
>>
>> Shortly:
>> "AddHandler webbrowser1.Document.MouseOver, AddressOf
>> Me.DisplayHyperlinks"
>>
>> ....that syntax claims no error when it's built / compiled, but
>> IntelliSense doesn't recognize "Document" after "webbrowser1" object.
>>
>> Why?
>>
>> I hope i have explained enoug clear,
>> Thanks,
>>
>> Onur Güzel
>>
>> Finally got a chance to test this and I do not see the problem you
>> describe.
>>
>> The app I used to test is one that takes a list of URL's and in a
>> tabcontrol
>> , creates a new tabpage, a new WebBrowser, and then adds the WebBrowser
>> to
>> the tabpage and the tabpage to the tabcontrol.
>>
>> My code is (for the webbrowser) is just
>>
>> Dim wc As New WebBrowser
>>
>> Now when I type
>>
>> AddHandler wc. (now I get document) . and I get a list of not just
>> events
>> but properties and functions as well.
>>
>> I can select MouseOver from the list and all is good.
>>
>> I am using VS 2008 Pro.
>>
>> LS
>>
>>

I changed my project for a test by adding a webbrowser to the form. I can
still use the addHandler to get the intellisense that is correct and
includes MouseOver. Again I am using VS 2008 so I don't know if that is the
difference.

I don't have any extra references or anything out of the ordinary.

LS