procedure TForm1.Button1Click(Sender: TObject);var h: HWnd; p: array[0..254] of char;begin h := GetWindow(Handle, GW_HWNDFIRST); while h <> 0 do begin if GetWindowText(h, p, 255) > 0 then Form1.Memo1.Lines.Add(p); h := GetWindow(h, GW_HWNDNEXT); end;end;