procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
mybutton:tbutton;
begin
if button=mbright then
begin
mybutton:=tbutton.create(self);
form1.InsertControl(mybutton);
mybutton.left:=x;
mybutton.top:=y;
end;
end;