哈哈,这个我知道。
如果你正在开发一个新构件,你不得不在每一次修改后花大量时间重新安装此构件以进行测试。其实,这里有一个更简便的方法:
首先,创建一个新的工程。
然后将构件代码的单元加入到uses行中。
最后一步就是在Form的OnCreate事件中加入类似以下代码
procedure TForm1.FormCreate(Sender: TObject);
begin
with TComponent1.Create(self) do
begin
Parent := self; // This makes the component visible at runtime
{now you can define the values for other properties }
Caption := '...';
Left := 100;
Top := 100;
.
.
.
end;
end;
如果你正在开发一个新构件,你不得不在每一次修改后花大量时间重新安装此构件以进行测试。其实,这里有一个更简便的方法:
首先,创建一个新的工程。
然后将构件代码的单元加入到uses行中。
最后一步就是在Form的OnCreate事件中加入类似以下代码
procedure TForm1.FormCreate(Sender: TObject);
begin
with TComponent1.Create(self) do
begin
Parent := self; // This makes the component visible at runtime
{now you can define the values for other properties }
Caption := '...';
Left := 100;
Top := 100;
.
.
.
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货