我的一个获取 Form RTTI 信息的小例子
来源:互联网 发布:使用模板编写sql语句 编辑:程序博客网 时间:2024/06/07 05:56
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
uses typInfo;
{$R *.dfm}
procedure getPropInfomation(aclass:Tobject;aStrings:tstrings);
var
PropCount :integer;
PropStr:string;
PropList : PPropList;
i:integer;
s:string;
begin
Propcount := getTypeData(aclass.ClassInfo).PropCount;
getmem(propList,propcount*sizeof(TPropInfo));
getProplist(aclass.classinfo,PropList);
for i:=0 to PropCount-1 do
begin
if PropList[i].PropType^.Kind <> typinfo.tkMethod then
begin
s := PropList[i].Name+' '+ PropList[i].PropType^.Name;
aStrings.Add(s);
end;
// PropStr :='PropName:='+Propstr+PropList[i]^.Name+' TypeName:='+Proplist[i]^.propKind^.Name;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
getPropInfomation(form1,memo1.Lines);
end;
end.
- 我的一个获取 Form RTTI 信息的小例子
- RTTI的一个例子
- Rtti 单元(4): 获取结构的信息
- C# 获取 MP3信息结构 的一个小例子(基于v1版的ID3)
- Rtti 单元(3): 获取有序类型的信息
- Rtti 单元(5): 获取方法的更多信息
- 每日程炼-delphi2010 Rtti获取某一个类的信息
- 一个小的例子
- 我写的一个触发器的小例子
- 我用QStackedWidget做的一个小例子
- 我的一个 RTTI 练习(参照 d5开发人员指南)
- 我的一个关于获取服务器信息的类
- 我的一个关于获取客户端信息的类
- prototype提交form的一个例子
- 对象与对象的类型信息----获取对象的RTTI信息
- RTTI:获取类的详细信息
- RTTI:获取类的详细信息
- 一个验证的小例子
- 日中贸易用语
- 自定义的Title
- 一个关于手机快速开发模型的想法
- 集成测试式样书的制作方法
- 我心中的痛-合金装备
- 我的一个获取 Form RTTI 信息的小例子
- CGI简介(Peercast使用的动态网页编程接口)
- 携手才能共进
- 堆(heap)和堆栈(stack)的区别
- 什么是Ajax
- 共享体现价值
- iptables 实例杂锦(端口封闭或转发,ip,mac)
- DHCP配置之没有情人的情人节!
- Sybase ASE段不能自动扩展空间的问题