L
loskiller
Unregistered / Unconfirmed
GUEST, unregistred user!
我代码如下
dll:
function CreateBtn(sender:Tobject):TButton;stdcall;
begin
result:=TButton.create(TForm(sender));
result.Caption:='df';
result.Parent:=TForm(sender);
end;
exe:
procedure TForm1.Button1_OnClick(sender:TObject)
var
btn:TButton;
begin
btn:=CreateBtn(self);
end;
现在的问题是每次到result.Parent:=TForm(sender);时会有错误.
dll:
function CreateBtn(sender:Tobject):TButton;stdcall;
begin
result:=TButton.create(TForm(sender));
result.Caption:='df';
result.Parent:=TForm(sender);
end;
exe:
procedure TForm1.Button1_OnClick(sender:TObject)
var
btn:TButton;
begin
btn:=CreateBtn(self);
end;
现在的问题是每次到result.Parent:=TForm(sender);时会有错误.