完 完颜康 Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-29 #5 var a: PTypeInfo; begin a := TypeInfo(TEdit); showmessage(a.Name); showmessage(Inttostr(VarType(a.Kind))); end; 为什么总是显示3?
var a: PTypeInfo; begin a := TypeInfo(TEdit); showmessage(a.Name); showmessage(Inttostr(VarType(a.Kind))); end; 为什么总是显示3?
T tseug Unregistered / Unconfirmed GUEST, unregistred user! 2002-11-29 #7 procedure TForm1.Button1Click(Sender: TObject); var a: PTypeInfo; begin a := TypeInfo(TEdit); showmessage(a.Name); ShowMessage(IntToStr(Ord(a.Kind))); //应该这样! showmessage(Inttostr(VarType(a.Kind))); //这个等价于VarType(0), 当然呵呵 end;
procedure TForm1.Button1Click(Sender: TObject); var a: PTypeInfo; begin a := TypeInfo(TEdit); showmessage(a.Name); ShowMessage(IntToStr(Ord(a.Kind))); //应该这样! showmessage(Inttostr(VarType(a.Kind))); //这个等价于VarType(0), 当然呵呵 end;