473,395 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

WebBrowser Control Events

I used the following to create a new Web Browser Control
Dim WithEvents webBrowserContent As New AxSHDocVw.AxWebBrowser

It works fine for some things for example
webBrowserContent.Navigate(url) works. However, the DocumentComplete,
NavigateComplete2 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 1833
On Jun 9, 9:52 am, "Anil Gupe/keen inc." <anil-l...@icinema.com>
wrote:
I used the following to create a new Web Browser Control
Dim WithEvents webBrowserContent As New AxSHDocVw.AxWebBrowser

It works fine for some things for example
webBrowserContent.Navigate(url) works. However, the DocumentComplete,
NavigateComplete2 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.keeninc.netwww.icinema.comwww.wizo.tv
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_DocumentCompleted(ByVal sender As
System.Object, ByVal e As
System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs) Handles
WebBrowser1.DocumentCompleted
' Code here
End Sub

'Navigated event
Private Sub WebBrowser1_Navigated(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles
WebBrowser1.Navigated
' 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
"kimiraikkonen" <ki*************@gmail.comwrote in message
news:fe**********************************@k37g2000 hsf.googlegroups.com...
On Jun 9, 9:52 am, "Anil Gupe/keen inc." <anil-l...@icinema.com>
wrote:
I used the following to create a new Web Browser Control
Dim WithEvents webBrowserContent As New AxSHDocVw.AxWebBrowser

It works fine for some things for example
webBrowserContent.Navigate(url) works. However, the DocumentComplete,
NavigateComplete2 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.keeninc.netwww.icinema.comwww.wizo.tv
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_DocumentCompleted(ByVal sender As
System.Object, ByVal e As
System.Windows.Forms.WebBrowserDocumentCompletedEv entArgs) Handles
WebBrowser1.DocumentCompleted
' Code here
End Sub

'Navigated event
Private Sub WebBrowser1_Navigated(ByVal sender As System.Object, ByVal
e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles
WebBrowser1.Navigated
' 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
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...
1
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...
1
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...
3
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...
2
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...
7
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'...
2
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...
5
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...
11
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: ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...

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.