Has IE gotten so complex you can't get the URL from IE? The code at
http://www.mvps.org/access/api/api0051.htm used to work. Now it returns
nothing. Is this due to having the IE/Yahoo/Google/WhateverElse toolbars?
I've determined where it fails...at least for me....on the third If()
statement in function Refresh. Maybe MS has changed the value of
ComboBoxEx32 to some other value?
Is there a way to get the URL from an IE window if you have the hWnd of
it? I've got the class and caption, no URL.
Private Const mconIE_COMBOEx = "ComboBoxEx32"
'this works
If fIsNT() Then
hWndChild = apiFindWindowEx(hWnd, 0, _
conIE_WORKERW, vbNullString)
Else
hWndChild = apiFindWindowEx(hWnd, 0, _
mconIE_WORKERA, vbNullString)
End If
'this works
If hWndChild 0 Then
' Rebar is child of Worker window
hWndChild = apiFindWindowEx(hWndChild, 0, _
mconIE_REBAR, vbNullString)
End If
'heres where it fails. It always returns 0
If hWndChild 0 Then
' ComboboxEx is child of Rebar window
hWndChild = apiFindWindowEx(hWndChild, 0, _
mconIE_COMBOEx, vbNullString)
End If
'since it's 0 now, it's ignored
If hWndChild 0 Then
' ComboBox is child of ComboBoxEx Window
hWndChild = apiFindWindowEx(hWndChild, 0, _
mconIE_COMBO, vbNullString)
End If
'since it's 0 now, it's ignored
If hWndChild 0 Then
' Edit class is child of ComboBox window
hWndChild = apiFindWindowEx(hWndChild, 0, _
mconIE_EDIT, vbNullString)
End If