function
EnumWindowProc(Handle: hWnd; lPalam: Integer):Boolean;Stdcall;
Var
Title: array[0..255] of char;
begin
//タイトルがあって表示されているウインドウをメモに書き込む
If (GetWindowText(Handle, Title,255 )
<> 0) And
IsWindowVisible(Handle) then
Form1.Memo1.Lines.Add(Title);
Result := True;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo1.Clear ;
EnumWindows(@EnumWindowProc, 0);
end;
|