你在k1 在getcomponent时还是存在的;你将button3改成这样看看procedure TForm1.Button3Click(Sender: TObject);
begin
k1.Visible := false;//将当前有的屏蔽掉
clipBoard.GetComponent(self,self);
end;
然后你看,就知道只有一个了;
begin
k1.Visible := false;//将当前有的屏蔽掉
clipBoard.GetComponent(self,self);
end;
然后你看,就知道只有一个了;
if Assigned(TheComponent) then exit
else
Create_theComponent
end
虽然你的解决方法不能符合我的需要,但你是第一个回答问题的。
else
Create_theComponent
end