Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > API > IE7 InternetExplorer Tabs problem with Events BeforeNavigate DocumentComplete VB6

Thread Tools Display Modes
Old 11-06-2008, 11:56 PM
eugene2005 eugene2005 is offline
Join Date: Sep 2005
Posts: 68
Default IE7 InternetExplorer Tabs problem with Events BeforeNavigate DocumentComplete VB6

IE7 tabs vb6

In vb6 to monitor beforenavigate or documentcomplete and other functions in ie6 all I had to do is to use this code

Private Sub tmrFindIE_Timer()
On Error GoTo raport
If prevwindow <> GetForegroundWindow() Then
prevwindow = GetForegroundWindow()
makelog Me.Name & ";prevwindow " & prevwindow & " <> GetForegroundWindow() " & GetForegroundWindow()
'makelog Me.Name & ";exit timer sub prevwindow " & prevwindow & " = GetForegroundWindow() " & GetForegroundWindow()
Exit Sub
End If

Set SWs = Nothing
Set SWs = New ShellWindows
Dim n As Integer
n = 0
For Each IE In SWs
n = n + 1
If TypeName(IE.Document) = "HTMLDocument" Then
If prevwindow = IE.hwnd Then
Set EvtSink = Nothing
Set EvtSink = IE
makelog "SWs count=" & SWs.Count & "; n=" & n & ";IE.hwnd=" & IE.hwnd & "; IE.url=" & IE.LocationURL
Exit Sub
End If
End If

But in ie7 this only works if windows of IE7 was opened and only one tab opened in it
If user opens more tabs then no events occur, no beforenavigate nor documentcomplete

How to attach to Set EvtSink = IE for active tab in ie7?
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
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

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

Forum Jump


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..