-
Please anybody help me with this problem:
I want to record all hyperlinks the mouse is moved over. When moving the mouse cursor over a link in IE the statusbar at the bottom of the IE window shows the link properties. I need this information somehow imported to my program running in the background.
-
You can monitor the text in the Statusbar using the API's in a Timer, i.e.
Code:
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_GETTEXT = &HD
Private Sub Timer1_Timer()
Static sLastText As String
Dim lHwnd As Long
Dim sText As String
lHwnd = FindWindowEx(0, 0, "IEFrame", vbNullString)
lHwnd = FindWindowEx(lHwnd, 0, "msctls_statusbar32", vbNullString)
sText = Space(256)
sText = Left(sText, SendMessage(lHwnd, WM_GETTEXT, 256, ByVal sText))
If sLastText <> sText Then
sLastText = sText
Debug.Print sText
End If
End Sub
-
That's exactly what I needed!
THANKS!!!!
:) :) :) :) :) :) :) :) :) :) :) :)