Re: How to catch Internet Explorer events?

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi Ben,
Thanks for your quick response.
I familiar with some of these events, but I still don't know how to catch
them from my windows application form, and how to catch the specific event
on a specific open browser (if I have some open browsers).
I sure do need some assistance with that.
Thanks,
- Tal.


"Ben Voigt" <rbv@xxxxxxxxxxxxx> wrote in message
news:OxhKUbOBHHA.1224@xxxxxxxxxxxxxxxxxxxxxxx

"Tal Shachar" <tal.shachar@xxxxxxxxxxx> wrote in message
news:%2345N6fNBHHA.1012@xxxxxxxxxxxxxxxxxxxxxxx
Hello,
I'm building a windows application, and I need to catch the open
Microsoft
Internet Explorer events (e.g. changed url, new browser window opened,
current active browser, etc.) - Can anyone assist me with that? I managed
to
know the location url of the open browsers by doing the following:
using SHDocVw;
.....

foreach (InternetExplorer ie in new ShellWindows())
{
string url = ie.LocationURL;
}

.....

But that's it, I don't know how to continue from here (and if this is the
direction...), any ideas?

According to my MSDN, that InternetExplorer object has a bunch of events:

BeforeNavigate Fires before navigation occurs in the given object (on
either a window or frameset element).
BeforeNavigate2 Fires before navigation occurs in the given object
(on either a window or frameset element).
CommandStateChange Fires when the enabled state of a command changes.
DocumentComplete Fires when a document has been completely loaded and
initialized.
DownloadBegin Fires when a navigation operation is beginning.
DownloadComplete Fires when a navigation operation finishes, is
halted, or fails.
FileDownload Fires to indicate that a file download is about to
occur. If a file download dialog is to be displayed, this event is fired
prior to the display of the dialog.
NavigateComplete Fires after a navigation to a link is completed on
either a window or frameSet element.
NavigateComplete2 Fires after a navigation to a link is completed on
either a window or frameSet element.
NavigateError Fires when an error occurs during navigation.
NewWindow Fires when a new window is to be created.
NewWindow2 Fires when a new window is to be created.
NewWindow3 Raised when a new window is to be created. Extends
NewWindow2 with additional information about the new window.
OnFullScreen Fires when the FullScreen property is changed.
OnMenuBar Fires when the MenuBar property is changed.
OnQuit Fires before the Internet Explorer application quits.
OnStatusBar Fires when the StatusBar property is changed.
OnTheaterMode Fires when the TheaterMode property is changed.
OnToolBar Fires when the ToolBar property is changed.
OnVisible Fires when the Visible property of the object is changed.
PrintTemplateInstantiation Fires when a print template has been
instantiated.
PrintTemplateTeardown Fires when a print template has been
destroyed.
PrivacyImpactedStateChange Fired when an event occurs that impacts
privacy or when a user navigates away from a URL that has impacted
privacy.
ProgressChange Fires when the progress of a download operation is
updated on the object.
PropertyChange Fires when the PutProperty method of the object
changes the value of a property.
SetSecureLockIcon Fires when there is a change in encryption level.
StatusTextChange Fires when the status bar text of the object has
changed.
TitleChange Fires when the title of a document in the object becomes
available or changes.
UpdatePageStatus Not currently implemented.
WindowActivate Not currently implemented.
WindowMove Not currently implemented.
WindowResize Not currently implemented.



Appreciate all the help I can get.

TIA,

- Tal.







.



Relevant Pages

  • Re: How to catch Internet Explorer events?
    ... Internet Explorer events (e.g. changed url, new browser window opened, ... BeforeNavigate2 Fires before navigation occurs in the given object (on ... OnQuit Fires before the Internet Explorer application quits. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Automating a Drag & Drop Event in tcl using twapi
    ... See below for a script that fires up MS Paint and then draws a square by ... # Maybe the window has not been put up yet. ...
    (comp.lang.tcl)
  • Re: How to avoid the resemblance of class hierarchies?
    ... It fires a SignalThreadCompleted signal when work is done. ... I /need/ this sort of functionality, because you can e.g. click a cancel ... The indicator object here is the dialog window. ... This is only possible if I can call a cancelfunction on the task object. ...
    (comp.object)
  • Re: duplicated request for servlet outputting PDF
    ... I moved the code to a servlet in a popup window, ... the stream and fires up the external app giving it the URL. ...
    (comp.lang.java.programmer)
  • RE: All pages under Home page open in a new window
    ... All pages under Home page open in a new window ... I built my web site by adding pages in navigation view, ... shared border with navigation on all pages. ... the Link Bar buttons did not automatically ...
    (microsoft.public.frontpage.client)