Ver Mensaje Individual
  #1  
Antiguo 31-05-2008
Avatar de Draker
Draker Draker is offline
Miembro
 
Registrado: ene 2005
Posts: 27
Reputación: 0
Draker Va por buen camino
Obtener URLs abiertas de Internet Explorer

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..
Responder Con Cita