Ver Mensaje Individual
  #1  
Antiguo 30-06-2006
Avatar de dec
dec dec is offline
Moderador
 
Registrado: dic 2004
Ubicación: Alcobendas, Madrid, España
Posts: 13.107
Reputación: 34
dec Tiene un aura espectaculardec Tiene un aura espectacular
Cómo enumerar todas las ventanas superiores

Cómo enumerar todas las ventanas superiores.

Código Delphi [-]
function EnumWindowsProc(Wnd : HWnd;Form : TForm1) : Boolean; Export; {$ifdef Win32} StdCall; {$endif}
var
  Buffer : Array[0..99] of char;
begin
  GetWindowText(Wnd,Buffer,100);
  if StrLen(Buffer) <> 0 then
    Form.ListBox1.Items.Add(StrPas(Buffer));
  Result := True;
end;


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