473,748 Members | 2,361 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 Güzel
Jul 7 '08 #1
11 2216

"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

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 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 #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
2119
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
8097
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
1336
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
1437
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
4835
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
2654
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
2547
by: v4vijayakumar | last post by:
#include <string> #include <iostream> using namespace std; int main() { string str; str.resize(5); str = 't';
7
1601
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
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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
9363
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
9312
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9238
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8237
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4593
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...
1
3300
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

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.