mayayana
Sun Jun 26 17:36:18 CDT 2005
> Thanks. Very useful.
> Okay, Newbie questions then. I am looking at
>
http://msdn.microsoft.com/workshop/browser/webbrowser/reference/objects/inte
rnetexplorer.asp
>
> Looking at InternetExplorer Objects and there is no mention of
> Eventname.
>
> How do I call this??? I have something like this but no dice...
>
> Sub IE_Eventname
> WScript.Echo EventName.Name
> End Sub
>
I meant that as a sample of the syntax. It's set up
as declared event object + event name. So if
you use "IE_" in CreateObject as the object name
for events, then the subs will be like:
Sub IE_DownloadComplete()
Sub IE_NavigateComplete(sURL)
[ Note that the underscore is not an inherent part
of the declare. If you used "IEObject" in the
CreateObject function, instead of "IE_",
then it would be:
Sub IEObjectDownloadComplete()
]
If you need to find the parameters you can look at
SHDOCVW.DLL in an object browser. The events
for IE are as follows. (This should save you a half hour
or so clicking around the MSDN mess):
Event StatusTextChange(Text as String)
Info: Statusbar text changed.
Event ProgressChange(Progress as Long, ProgressMax as Long)
Info: Fired when download progress is updated.
Event CommandStateChange(Command as Long, Enable as Boolean)
Info: The enabled state of a command changed.
Event DownloadBegin
Info: Download of a page started.
Event DownloadComplete
Info: Download of page complete.
Event TitleChange(Text as String)
Info: Document title changed.
Event PropertyChange(szProperty as String)
Info: Fired when the PutProperty method has been called.
Event BeforeNavigate2(pDisp as Object, URL as Variant, Flags as Variant,
TargetFrameName as Variant, PostData as Variant, Headers as Variant, Cancel
as Boolean)
Info: Fired before navigate occurs in the given WebBrowser (window or
frameset element). The processing of this navigation may be modified.
Event NewWindow2(ppDisp as Object, Cancel as Boolean)
Info: A new, hidden, non-navigated WebBrowser window is needed.
Event NavigateComplete2(pDisp as Object, URL as Variant)
Info: Fired when the document being navigated to becomes visible and enters
the navigation stack.
Event DocumentComplete(pDisp as Object, URL as Variant)
Info: Fired when the document being navigated to reaches
ReadyState_Complete.
Event OnQuit
Info: Fired when application is quiting.
Event OnVisible(Visible as Boolean)
Info: Fired when the window should be shown/hidden
Event OnToolBar(ToolBar as Boolean)
Info: Fired when the toolbar should be shown/hidden
Event OnMenuBar(MenuBar as Boolean)
Info: Fired when the menubar should be shown/hidden
Event OnStatusBar(StatusBar as Boolean)
Info: Fired when the statusbar should be shown/hidden
Event OnFullScreen(FullScreen as Boolean)
Info: Fired when fullscreen mode should be on/off
Event OnTheaterMode(TheaterMode as Boolean)
Info: Fired when theater mode should be on/off
Event BeforeNavigate(URL as String, Flags as Long, TargetFrameName as
String, PostData as Variant, Headers as String, Cancel as Boolean)
Info: Fired when a new hyperlink is being navigated to.
Event NavigateComplete(URL as String)
Info: Fired when the document being navigated to becomes visible and enters
the navigation stack.
Event NewWindow(URL as String, Flags as Long, TargetFrameName as String,
PostData as Variant, Headers as String, Processed as Boolean)
Info: Fired when a new window should be created.
Event FrameBeforeNavigate(URL as String, Flags as Long, TargetFrameName as
String, PostData as Variant, Headers as String, Cancel as Boolean)
Info: Fired when a new hyperlink is being navigated to in a frame.
Event FrameNavigateComplete(URL as String)
Info: Fired when a new hyperlink is being navigated to in a frame.
Event FrameNewWindow(URL as String, Flags as Long, TargetFrameName as
String, PostData as Variant, Headers as String, Processed as Boolean)
Info: Fired when a new window should be created.
Event WindowMove
Info: Fired when window has been moved.
Event WindowResize
Info: Fired when window has been sized.
Event WindowActivate
Info: Fired when window has been activated.