// 用线程unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls;type TMyThread = class(TThread) private FListView: TListView; protected procedure Execute; override; public constructor Create(CreateSuspend: Boolean; ALv: TListView); end; TForm1 = class(TForm) lv1: TListView; btn2: TButton; procedure btn2Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}{ TMyThread }constructor TMyThread.Create(CreateSuspend: Boolean; ALv: TListView);begin inherited Create(CreateSuspend); FListView := ALv;end;procedure TMyThread.Execute;var Item: TListItem; I: Integer;begin for I := 0 to 100 do begin Item := FListView.Items.Add; Item.Caption := Format('ListVie Item %d', ); Sleep(10); end;end;procedure TForm1.btn2Click(Sender: TObject);begin TMythread.Create(False, lv1);end;end.