HighTechTalks DotNet Forums  

How to catch Internet Explorer events?

Dotnet Framework (CLR) microsoft.public.dotnet.framework.clr


Discuss How to catch Internet Explorer events? in the Dotnet Framework (CLR) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Tal Shachar
 
Posts: n/a

Default How to catch Internet Explorer events? - 11-10-2006 , 09:54 AM






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?

Appreciate all the help I can get.

TIA,

- Tal.



Reply With Quote
  #2  
Old   
Ben Voigt
 
Posts: n/a

Default Re: How to catch Internet Explorer events? - 11-10-2006 , 11:40 AM







"Tal Shachar" <tal.shachar (AT) hotmail (DOT) com> wrote

Quote:
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.


Quote:
Appreciate all the help I can get.

TIA,

- Tal.







Reply With Quote
  #3  
Old   
Tal Shachar
 
Posts: n/a

Default Re: How to catch Internet Explorer events? - 11-10-2006 , 03:13 PM



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 (AT) nospam (DOT) nospam> wrote

Quote:
"Tal Shachar" <tal.shachar (AT) hotmail (DOT) com> wrote in message
news:%2345N6fNBHHA.1012 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
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.








Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.