Buenas tardes, Utilizando el siguiente codigo, puede saberse la URL de la pagina del IE.
Código Delphi
[-]
function GetText(WinHandle: THandle): string;
var
P: array[0..256] of Char;
begin
P[0] := #0;
GetWindowText(WinHandle, P, 255);
if P[0] = #0 then Result := ''
else
Result := P;
end;
procedure TformMenuPrincipal.Button1Click(Sender: TObject);
var
Hx: THandle;
P: array[0..256] of Char;
Item: TListItem;
begin
lsListaVentanas.Items.Clear;
Hx := FindWindow(nil, nil);
GetClassName(Hx, P, SizeOf(P));
if string(P) = 'IEFrame' then
begin
Item := lsListaVentanas.Items.Add;
Item.SubItems.Add(IntToStr(Hx));
Item.Caption := GetText(Hx);
end;
while Hx <> 0 do
begin
Hx := GetWindow(Hx, GW_HWNDNEXT);
GetClassName(Hx, P, SizeOf(P));
if string(P) = 'IEFrame' then
begin
Item := lsListaVentanas.Items.Add;
Item.SubItems.Add(IntToStr(Hx));
Item.Caption := GetText(Hx);
end;
end;
end;
El problema es que ahora con el IE7, pues utiliza multiples pestañas por lo cual este codigo no es efectivo, la pregunta es:
De que manera puedo obtener la URL de todas las Tabs del IE?
De antemano mil gracias..