试试如下代码:<br>function GetAllLabelCaption(Form:TForm):TStringList;<br>var i:integer;tmpList:TStringList;<br>begin<br> tmpList:=TStringList.Create;<br> for i:=0 to Form.ControlCount-1 do<br> begin<br> if Form.Controls is TLabel then <br> tmpList.Add((Form.Controls as TLabel).Caption);<br> end;<br> Result:=tmpList;<br>end;