Components 与 Controls
Components 与 Controls
procedure TForm1.Button1Click(Sender: TObject); var i: Integer; begin Memo1.Clear; Memo1.Lines.Add('窗体所属的 Components:'); for i := 0 to Self.ComponentCount - 1 do Memo1.Lines.Add(Components[i].Name); Memo1.Lines.Add(''); Memo1.Lines.Add('窗体所属的 Controls:'); for i := 0 to Self.ControlCount - 1 do Memo1.Lines.Add(Controls[i].Name); end;