窗口上面放一个memo和一个button
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses TypInfo;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
PropInfo: PPropInfo;
TempList: PPropList;
i, j, iCount: integer;
sProperty, sValue: string;
Comp: TComponent;
begin
Comp := Self;
iCount := GetPropList(Comp, TempList);
for j := 0 to iCount - 1 do
begin
PropInfo := TempList^[j];
Memo1.lines.add(PropInfo^.Name);
end;
FreeMem(TempList);
end;
end.