就像TBitBtn这样:
{************************************************************************}
unit BitBtnEx;interfaceuses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, Buttons;type
TBitBtnEx = class(TBitBtn)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Samples', [TBitBtnEx]);
end;end.{************************************************************************}
可以吗?
{************************************************************************}
unit BitBtnEx;interfaceuses
Windows, Messages, SysUtils, Classes, Controls, StdCtrls, Buttons;type
TBitBtnEx = class(TBitBtn)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Samples', [TBitBtnEx]);
end;end.{************************************************************************}
可以吗?
解决方案 »
- 无耻的中国电信-请大家相互传阅
- 散分的问题,进来看看,回复有分
- 初学者提问:delphi有控件数组吗?
- 请各位网络编程高手帮忙,关于ServerSocket判断客户端异常断开连接的问题?急急...
- -----------ADOconnection出毛病了----------
- 关于Tdbcomcobox的傻瓜问题,在线等待!!!
- 求救!!!!各位Programmer都是怎样调节自己的状态?
- 怎样在调试程序时关闭那该死的cpu窗口,回答后马上给分,我在线等待
- 一个怪问题,谁能帮忙?
- to (来自差生市) 再来接分
- 一个在win98中有win2000下没有的API如何在win2000的delphi中编译?
- Adoquery事务处理的问题
为什么在[Component]-[New component]->Ancestor Type: 中不能找以TForm呢?
可以编译通过.
我在我新的工程中use了这个单元,可以我在程序动态创建时
testForm:=TFormEx.Create(nil);
执行时有错误提示:
Resource TFormEx not found.
unit CustomFormEx;interfaceuses
Windows, Messages, SysUtils, Classes, Controls, Forms;type
TCustomFormEx = class(TForm)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
end;procedure Register;implementationprocedure Register;
begin
RegisterComponents('Samples', [TCustomFormEx]);
end;end.可是不行?
(我不明白:[Component]-[New component]->Ancestor Type: 中不能找以TForm呢.Delphi为什么不提供.)谢谢大家.
我在大富翁找到了.