More like software-banzai. Why not simply:Code: Pascal [Select][+][-]procedure TForm1.Button1Click(Sender: TObject);begin Close;end;
Because this is sample, the real thing is more complex, the problem is, i need a button when i pressed, the button must be destroyed.
procedure TForm1.Button1Click(Sender: TObject);begin Application.ReleaseComponent(Sender);end;