help about the BeforeNavigation2

G

Guest

Hi all
I tried to use this BeforeNavigation2 event and apparently it fires neither
in my VB application nor in my C #code!

I tried the resolution claimed by Microsoft at:

http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q311298&ID=KB;EN-US

The example in this article is designed for some one hosting a WebBrowser
Control not using a InternetExplorer directly!!! Is there any alternatives?

The problem happens in the following statement.

Dim icpc As UCOMIConnectionPointContainer = _
CType(AxWebBrowser1.GetOcx(), COMIConnectionPointContainer)

Since I am not using AxWebBrowser object at inside my Application... My
application doesn’t have any WebBrowser Control.

I am using the InternetExplorer Object, which is external stand alone
instance of Internet Explorer like this:

IE = CreateObject("InternetExplorer.Application.1").

Also please can any one advice me how to read the data in the PostData
object encapsulated in the BeforeNavigation2 event.

Cheers
 
A

Alex Passos

Have you thought about designing a Browser Helper Object? The BHO gets
loaded with Internet Explorer and you can sink all the events within it and
affect their execution.

Alex
 
G

Guest

I figured out that the solution is to replace:

Dim icpc As UCOMIConnectionPointContainer = CType(AxWebBrowser1.GetOcx(),
COMIConnectionPointContainer)

WITH

Dim icpc As UCOMIConnectionPointContainer = CType(IE,
COMIConnectionPointContainer)

That is o replace the AxWebBrowser1.GetOcx(), WITH IE object.

For the benefit of another developers and programmers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top