procedure TForm1.Button1Click(Sender: TObject);<br>var<br> handle:THandle;<br> i,j:integer;<br> buf:array [0..100] of char;<br>begin<br> handle:=FindWindow(nil,'Form1');<br> handle:=GetWindow(handle,GW_CHILD);<br> while handle<>0 do<br> begin<br> j:=SendMessage(handle,LB_GETCOUNT,0,0);<br> for i:=0 to j-1 do<br> begin<br> SendMessage(handle,LB_GETTEXT,i,integer(@buf[0]));<br> Memo1.Lines.Add(buf);<br> end;<br> handle:=GetWindow(handle,GW_HWNDNEXT);<br> end;<br>end;