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