Ver Mensaje Individual
  #4  
Antiguo 22-07-2006
rounin rounin is offline
Miembro
 
Registrado: sep 2005
Posts: 43
Reputación: 0
rounin Va por buen camino
Saludos!

En principio, si conoces una parte del nombre de la ventana,
puedes usar EnumWindows.
Por ejemplo:

Código Delphi [-]
 
function EnumFunc(hWnd: THandle; lParam: Longint): BOOL; stdcall;
var s: string;
    L: Integer;
begin
  Result := True;
  L := GetWindowTextLength(hWnd);
  SetLength(s, L);
  GetWindowText(hWnd, @s[1], L+1);
  if (   Pos('Microsoft Internet Explorer', s) > 0  )and
     (   Pos('Problema con el FindWindow',  s) > 0  )then
  begin
    Result := False;
    TForm1(lParam).Caption := 'hwnd = '+IntToStr(hWnd); 
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  EnumWindows(@EnumFunc, Longint(Self));
end;
Responder Con Cita