<br>var<br> I: Integer;<br> hWnd: Integer;<br> hWndArray: array [1..6] of Integer;<br>begin<br> hWnd := FindWindow('Notepad', nil);<br> hWndArray[1] := hWnd;<br> For I := 2 to 6 Do<br> Begin<br> hWndArray[I] := GetNextWindow(hWnd, GW_HWNDNEXT);<br> hWnd := hWndArray[I];<br> End;<br> ShowMessage('End');<br>