A
aKnightChen
Unregistered / Unconfirmed
GUEST, unregistred user!
由于使用预编译,我必须编译两个版本的程序.我想只用一个程序来实现.(即:程序运行时动态改变),如何能做到....以下是控件单元的简码:unit kEdtinterfaceuses...type {$IFDEF IS_Combox} TkEdt = class(TComboBox) {$ELSE} TkEdt = class(TEdit) {$ENDIF} private ... published { Published declarations } function myText:string; end;procedure Register;implementationfunction TkEdt.myText:string;begin {$IFDEF IS_Combox} Result:=.... {$ELSE} Result:=..... {$ENDIF}end;end.