
Launching vb app when IE launch
Also you can add a reference to Microsoft Internet Controls and the
following code:
Option Explicit
Dim WithEvents SW As ShellWindows
Private Sub Form_Load()
Set SW = New ShellWindows
End Sub
Private Sub SW_WindowRegistered(ByVal lCookie As Long)
Dim IE As InternetExplorer, hW As Long
Dim V1, V2
V1 = lCookie
V2 = Null
Set IE = SW.FindWindow(V1, V2, SWC_BROWSER, hW, SWFO_COOKIEPASSED Or
SWFO_NEEDDISPATCH)
If Not IE Is Nothing Then Debug.Print "New Explorer window."
End Sub
Be carefull because SW_WindowRegistered is called when a Internet Explorer o
Window Explorer or may other windows are opened. But is not called when a
Windows Explorer windows becomes a Internet Explorer window in vers >= 4.
ShellWindows is a collection of all IE, Windows Explorer (and may be other)
windows.
--
Eduardo Morcillo
Free ActiveX Controls: http://www.*-*-*.com/