I was thinking something simple like:
===========================
Dim WithEvents IE As InternetExplorer
Dim WithEvents IEWin As ???????
.
.
.
Set IE = CreateObject("InternetExplorer.Application")
Set IEWin = SomeFuncToGetTheWindowObject(IE.HWND)
And then:
Private Sub IEWin_OnFocus()
<Code to handle focus change here>
============================
Thoughts?
Thanks,
Chris
--- Sample begin --------------------------------------
Dim ie As New SHDocVw.InternetExplorer
Dim win As IHTMLWindow2
Dim WithEvents ieEvt As SHDocVw.WebBrowser
Dim WithEvents winEvt As HTMLWindow2
Private Sub Form_Load()
Set ieEvt = ie
ie.Visible = True
ie.Navigate "http://hongkong.scmp.com/index.html"
End Sub
Private Sub ieEvt_NavigateComplete2(ByVal pDisp As Object, URL As
Variant)
' Called when navigation is completed
' Get document window and subscribe on its events
Dim wb As WebBrowser
Set wb = pDisp
Set win = wb.Document.parentWindow
Set winEvt = win
End Sub
Private Sub winEvt_OnFocus()
' Called when window has focus
End Sub
Private Sub winEvt_OnBlur()
' Called when window lost focus
End Sub
--- Sample end --------------------------------------
FG.
cb...@home.com (Chris Young) wrote in message news:<9rsn5q$mg...@kcweb01.netnews.att.com>...