473,548 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WebBrowser Control Events

I used the following to create a new Web Browser Control
Dim WithEvents webBrowserConte nt As New AxSHDocVw.AxWeb Browser

It works fine for some things for example
webBrowserConte nt.Navigate(url ) works. However, the DocumentComplet e,
NavigateComplet e2 and a couple of other events I tried do not trigger when
the user navigates in that WebBrowser Control - what am I doing wrong?

Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com
www.wizo.tv
Jun 27 '08 #1
2 1844
On Jun 9, 9:52 am, "Anil Gupe/keen inc." <anil-l...@icinema.co m>
wrote:
I used the following to create a new Web Browser Control
Dim WithEvents webBrowserConte nt As New AxSHDocVw.AxWeb Browser

It works fine for some things for example
webBrowserConte nt.Navigate(url ) works. However, the DocumentComplet e,
NavigateComplet e2 and a couple of other events I tried do not trigger when
the user navigates in that WebBrowser Control - what am I doing wrong?

Thanx,
--
Anil Guptewww.keenin c.netwww.icinem a.comwww.wizo.t v
Anil,
You can use Webbrowser control, wrapped version of ShDocVw and
available in your toolbox. After placing it on your form, double-click
on it and the such events can be created like this:

' Document completed event
Private Sub WebBrowser1_Doc umentCompleted( ByVal sender As
System.Object, ByVal e As
System.Windows. Forms.WebBrowse rDocumentComple tedEventArgs) Handles
WebBrowser1.Doc umentCompleted
' Code here
End Sub

'Navigated event
Private Sub WebBrowser1_Nav igated(ByVal sender As System.Object, ByVal
e As System.Windows. Forms.WebBrowse rNavigatedEvent Args) Handles
WebBrowser1.Nav igated
' Code here
End Sub

and you can find more by seeing events after "handles" clause.

Hope this helps,

Onur Güzel

Jun 27 '08 #2
Thanx, but I am already doing that, except that I am not inserting the
WebBrowser control, but I am creating it dynamically. The event handlers
exist in my document. In fact, as far as I could tell, these were working
while I was in VS 2003 environment, but not in VS 2005 which I am using now.

Thanx,
--
Anil Gupte
www.keeninc.net
www.icinema.com
www.wizo.tv
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:fe******** *************** ***********@k37 g2000hsf.google groups.com...
On Jun 9, 9:52 am, "Anil Gupe/keen inc." <anil-l...@icinema.co m>
wrote:
I used the following to create a new Web Browser Control
Dim WithEvents webBrowserConte nt As New AxSHDocVw.AxWeb Browser

It works fine for some things for example
webBrowserConte nt.Navigate(url ) works. However, the DocumentComplet e,
NavigateComplet e2 and a couple of other events I tried do not trigger when
the user navigates in that WebBrowser Control - what am I doing wrong?

Thanx,
--
Anil Guptewww.keenin c.netwww.icinem a.comwww.wizo.t v
Anil,
You can use Webbrowser control, wrapped version of ShDocVw and
available in your toolbox. After placing it on your form, double-click
on it and the such events can be created like this:

' Document completed event
Private Sub WebBrowser1_Doc umentCompleted( ByVal sender As
System.Object, ByVal e As
System.Windows. Forms.WebBrowse rDocumentComple tedEventArgs) Handles
WebBrowser1.Doc umentCompleted
' Code here
End Sub

'Navigated event
Private Sub WebBrowser1_Nav igated(ByVal sender As System.Object, ByVal
e As System.Windows. Forms.WebBrowse rNavigatedEvent Args) Handles
WebBrowser1.Nav igated
' Code here
End Sub

and you can find more by seeing events after "handles" clause.

Hope this helps,

Onur Güzel
Jun 27 '08 #3

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

Similar topics

5
7542
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files with little success. - When a new window is trying to pop up, how do I determine the target URL? How can I get the page to open in the current...
1
2649
by: boxim | last post by:
Hi All, Just after some other opinions really.... We're writing this application that in places implements the WebBrowser control to make certain bits look nicer as well as make things quicker to develop. To write each page as an owner drawn control would take ages. The only thing that bothers me is the comminication between the...
1
5564
by: Tuong | last post by:
I have a situation where i have a form that contains a webbrowser control. With this I was able to implement an application that can browse websites. One particular website i visited opens up another web page in a new window and then closes it. I was able to control this action by detecting the 'NewWindow' event and opening the webpage in my...
3
1569
by: Newton Godoy | last post by:
Hi all, I'm having some dificulties in using the webbrowser events in a windows forms. Events like downloadcomplete, navigatecomplete etc seem not be raised at all. For testing, I have placed a breakpoint inside the handler for those events but the program never stops there. Are there known issues with using webbrowser's events? The only...
2
3499
by: spamlaanbroek | last post by:
The .NET WebBrowser control in the Compact Framework 2.0 is a major headache. Once it takes the focus (e.g. by the user tapping on it) it keeps it and keyboard events are not passed to the form anymore even though KeyPreview is set to true. If there are no other controls on the form we don't get them at all to start with. I added a tiny...
7
11907
by: Dave Booker | last post by:
I am using a WebBrowser object in my .NET 2.0 application, but it is not shown to the user. Every time a timer event triggers it to perform a m_WebBrowser.Navigate() I get that classic IE 'click' and it steals the focus from the user's current application. How can I prevent the hidden WebBrowser from stealing focus? (And better yet can I...
2
5847
by: =?Utf-8?B?c25naWxi?= | last post by:
The WebBrowser control is described as exposing numerous public mouse events. See: http://msdn2.microsoft.com/en-us/library/ayestehw.aspx. many of the event are described as: "This event is not supported by this control. (inherited from WebBrowserBase)". Does this mean that I can't access these? I am using VS Express C#. Otherwise how do I...
5
8050
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in this status bar. How can i do this? Thanks.
11
2196
by: kimiraikkonen | last post by:
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...
0
7512
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...
0
7707
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. ...
0
7951
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...
1
7466
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...
0
7803
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...
0
6036
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...
1
5362
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...
1
1926
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
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.