473,698 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interesting IntelliSense behaviour with Webbrowser

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 DisplayHyperlin ks(ByVal sender As Object, ByVal e As
System.Windows. Forms.HtmlEleme ntEventArgs)

' My codes here

End Sub

Private Sub webbrowser1_Doc umentCompleted( ByVal sender As
System.Object, ByVal e As
System.Windows. Forms.WebBrowse rDocumentComple tedEventArgs) Handles
webbrowser1.Doc umentCompleted

' 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.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links

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

Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links"

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

Why?

I hope i have explained enoug clear,
Thanks,

Onur Gzel
Jul 7 '08 #1
11 2210

"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:2f******** *************** ***********@m44 g2000hsc.google groups.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 DisplayHyperlin ks(ByVal sender As Object, ByVal e As
System.Windows. Forms.HtmlEleme ntEventArgs)

' My codes here

End Sub

Private Sub webbrowser1_Doc umentCompleted( ByVal sender As
System.Object, ByVal e As
System.Windows. Forms.WebBrowse rDocumentComple tedEventArgs) Handles
webbrowser1.Doc umentCompleted

' 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.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links

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

Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links"

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

Why?

I hope i have explained enoug clear,
Thanks,

Onur Gzel

What are you trying to get. If you are trying to get a link when the mouse
is over one on a page you can use the StatusTextChang ed event to get links.

LS

Jul 7 '08 #2
kimiraikkonen wrote:
Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links"

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

Why?
It does on my machine. Me.WebBrowser1. Document comes right up. Something else
not compiling correctly?
Jul 8 '08 #3
>
What are you trying to get. If you are trying to get a link when the mouse
is over one on a page you can use the StatusTextChang ed event to get links.

LS
Yes, but that doesn't provide when mouse is over an image which is my
goal about retrieving image location.

However, i did it using "AddHandler webbrowser1.Doc ument.MouseOver ,
AddressOf Me.DisplayHyper links" but my question and wonder was just
about why Intellisense doesn't offer "Document" after webbrowser1
while you're typing syntax manually instead of pasting from
somewhere,you can test it. Though IntelliSense doesn't offer and
recognize "Document" after "webbrowser 1" object, if i type it without
addhandler keyword just to use its members somewhere else it sees
"Document" member of "webbrowser 1" object with no problem, but as i
said if paste the code without manually typing, there are no errors
reported even on building my application.

That's weird of IntelliSense.

Thanks,

Onur
Jul 8 '08 #4
kimiraikkonen wrote:
somewhere,you can test it. Though IntelliSense doesn't offer and
recognize "Document" after "webbrowser 1" object, if i type it without
addhandler keyword just to use its members somewhere else it sees
"Document" member of "webbrowser 1" object with no problem,
Ah, you mean it doesn't show Document after AddHandler.

No, it wouldn't. It will filter the list of WebBrowser members to show events
that can have a handler added.

You can get intellisense for the list of Document events by declaring a temp
variable first:
Dim x As HtmlDocument = WebBrowser1.Doc ument
AddHandler x.MouseOver, AddressOf Me.DisplayHyper links
Jul 8 '08 #5
Hi Steve,
Yes, if i use this syntax, intellisense recognizes every object with no
problem.
Dim x As HtmlDocument = WebBrowser1.Doc ument
AddHandler x.MouseOver, AddressOf Me.DisplayHyper links
But if i use in this way, it doesn't show "Document" property just after
"Webbrowser1"(i t's impatient that it expects an event), though that code is
compiled and it works as it should:

AddHandler kimibrowser.Doc ument.MouseOver , AddressOf Me.DisplayHyper links

Thanks for the care,

Onur Güzel
--
Best regards,

Onur Güzel
ki************* @hotmail.com
"Steve Gerrard" wrote:
kimiraikkonen wrote:
Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links"

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

Why?

It does on my machine. Me.WebBrowser1. Document comes right up. Something else
not compiling correctly?
Jul 8 '08 #6
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.Doc ument.MouseOver , AddressOf Me.DisplayHyper links
Thanks,

Onur Güzel

--
Best regards,

Onur Güzel
ki************* @hotmail.com
"Steve Gerrard" wrote:
kimiraikkonen wrote:
Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links"

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

Why?

It does on my machine. Me.WebBrowser1. Document comes right up. Something else
not compiling correctly?
Jul 8 '08 #7

"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:2f******** *************** ***********@m44 g2000hsc.google groups.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 DisplayHyperlin ks(ByVal sender As Object, ByVal e As
System.Windows. Forms.HtmlEleme ntEventArgs)

' My codes here

End Sub

Private Sub webbrowser1_Doc umentCompleted( ByVal sender As
System.Object, ByVal e As
System.Windows. Forms.WebBrowse rDocumentComple tedEventArgs) Handles
webbrowser1.Doc umentCompleted

' 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.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links

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

Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links"

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

Why?

I hope i have explained enoug clear,
Thanks,

Onur Gzel

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

Jul 8 '08 #8
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.DisplayHyper links

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.Doc ument.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.Doc ument
AddHandler x.MouseOver, AddressOf Me.DisplayHyper links

Thanks,

Onur
--
Best regards,

Onur Güzel
ki************* @hotmail.com
"Lloyd Sheen" wrote:
>
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:2f******** *************** ***********@m44 g2000hsc.google groups.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 DisplayHyperlin ks(ByVal sender As Object, ByVal e As
System.Windows. Forms.HtmlEleme ntEventArgs)

' My codes here

End Sub

Private Sub webbrowser1_Doc umentCompleted( ByVal sender As
System.Object, ByVal e As
System.Windows. Forms.WebBrowse rDocumentComple tedEventArgs) Handles
webbrowser1.Doc umentCompleted

' 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.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links

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

Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHyper links"

....that syntax claims no error when it's built / compiled, but
IntelliSense doesn't recognize "Document" after "webbrowser 1" 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

Jul 8 '08 #9

"kimiraikko nen" <ki***********@ discussions.mic rosoft.comwrote in message
news:4B******** *************** ***********@mic rosoft.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.DisplayHyper links

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.Doc ument.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.Doc ument
AddHandler x.MouseOver, AddressOf Me.DisplayHyper links

Thanks,

Onur
--
Best regards,

Onur Güzel
ki************* @hotmail.com
"Lloyd Sheen" wrote:
>>
"kimiraikkonen " <ki************ *@gmail.comwrot e in message
news:2f******* *************** ************@m4 4g2000hsc.googl egroups.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 DisplayHyperlin ks(ByVal sender As Object, ByVal e As
System.Windows .Forms.HtmlElem entEventArgs)

' My codes here

End Sub

Private Sub webbrowser1_Doc umentCompleted( ByVal sender As
System.Objec t, ByVal e As
System.Windows .Forms.WebBrows erDocumentCompl etedEventArgs) Handles
webbrowser1.Do cumentCompleted

' 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.Doc ument.MouseOver , AddressOf
Me.DisplayHype rlinks

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

Shortly:
"AddHandler webbrowser1.Doc ument.MouseOver , AddressOf
Me.DisplayHype rlinks"

....that syntax claims no error when it's built / compiled, but
IntelliSense doesn't recognize "Document" after "webbrowser 1" 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

Jul 9 '08 #10

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

Similar topics

12
2114
by: Peter van der Goes | last post by:
When a struct is created in C# and a parameterized constructor defined, the IntelliSense editor shows only the syntax for the parameterized constructor in tooltips, but not for the default constructor which appears to still exist. If this is not designed behavior, is it a bug or am I misusing my struct? If it is by design, could you please explain? I realize the behavior of a struct, as regards constructors, is different from that of...
6
8094
by: Stefan Kronberg | last post by:
I'm working on a solution containing about 20 projects. Some of the projects contain class definitions that are used in other of the projects. Most of the time intellisense is working ok, i.e. if I work with objects declared from my own classes intellisense will show me all alternatives (methods and properties from my classes and from the classes they are derived from). But sometimes I will get nothing from intellisense, completely nothing,...
0
1334
by: Babu Mannaravalappil | last post by:
(This is a cut-and-paste) of one of my previous posts. Since I did not get any help, I thought may be I should re-post it anew. Sorry!!) Environment: Visual Studio Enterprise 2003 DotNET 1.1 Language: C#. Microsoft SQL Server 2000. Windows XP with SP1 and all latest patches.
10
1431
by: Rakesh Rajan | last post by:
Hi, Seems like VB.NET Intellisense and complier does check for method definitions much. The following code compiles with no errors in VB.NET! (but of course, trust C# to be strict and perfect :) ) public class MyOwnClass { public void Print()
2
332
by: Marco | last post by:
Why c# intellisense is more powerful than c++ intellisense? In c# when type a character intellisense start and guide me.In c++ intellisense start only when I type a . or -> or ::. In c# user class are displayed in a specific color.Why I can't do it in c++? Marco.
12
4830
by: Peteroid | last post by:
I was creating my application just fine for the last 3 weeks or so. Then, starting this morning, IntelliSense seems to be having problems. It goes into a locked 'Updating IntelliSense..." mode. When this happens its time to close VS C++.NET, which can only be done via the Windows Task Manager. I tried repairing C++. It did seem to help, but the problem is back a few hours later. I will try creating a new project, copy over source files,...
1
2653
by: =?Utf-8?B?Sm9iIExvdA==?= | last post by:
i am creating a formula editor and would like to provide intellisense feature to the textbox in formula editor. does any one know how can i do that? thanks
28
2543
by: v4vijayakumar | last post by:
#include <string> #include <iostream> using namespace std; int main() { string str; str.resize(5); str = 't';
7
1599
by: Clive Dixon | last post by:
Sometimes when I'm typing the literal 'null', Intellisense decides to automatically change it to 'Nullable'. Is there any way anyone knows of stopping it doing this, apart from disabling Intellisense altogether? It's driving me totally mad.
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6532
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.