我做过取EmailSpider搜索出来的邮件地址的程序,它的数据是放在ListView中的,ListBox应该更简单。<br><br>procedure TForm1.Doit;<br>var<br> handle:THandle; //handle of the ListView<br> wparm:word;<br> lparm:longword;<br> result,i,j : integer;<br> str: array[0..100] of char;<br> p: PChar;<br>begin<br> Handle := 67556; //67556是用Spy++找出目标Listview的Handle<br> wparm := 0;<br> lparm := 0;<br> result := sendmessage(handle, LVM_GETITEMCOUNT, wparm, lparm);<br> self.Label1.Caption := inttostr(result);<br> p := @str;<br> for i := 0 to result - 1 do begin<br> application.ProcessMessages;<br> application.ProcessMessages;<br> SendMessage(handle, LVM_EDITLABEL , i, 0);<br> application.ProcessMessages;<br> application.ProcessMessages;<br> postMessage(SendMessage(handle, LVM_GETEDITCONTROL , 0, 0), WM_COPY , 0, 0);<br> application.ProcessMessages;<br> application.ProcessMessages;<br> memo1.Lines.Add('');<br> memo1.PasteFromClipboard;<br> sleep(100);<br> end;<br><br>end;