var
pPropInfo;
begin
p:=GetPropInfo(Memo1.ClassInfo,'Caption');
if p=nil then showmessage('No Caption')
else ShowMessage('Caption');
p:=GetPropInfo(Button1.ClassInfo,'Caption');
if p=nil then showmessage('No Caption')
else ShowMessage('Caption');
end;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
Edit1: TEdit;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
I:Integer;
ppiPropInfo;
pPropsPropList;
ptiTypeInfo;
ptdTypeData;
PropInfoPropInfo;
begin
for I:=0 to Self.ComponentCount-1 do
begin
PropInfo:=GetPropInfo(Components.classinfo,'Caption');
if PropInfo<>nil then
ShowMessage(Components.Name+' has Caption property')
else
ShowMessage(Components.Name+' has not Caption property');
end;
end;