You need to create your type based on the type of TShape , made:
Type TOperation = class(tshape) private Opname:string; procedure Opcreate(); end; Further, by pressing any button, this object will be created on the form. Sets the width, height, position, in general, everything that is needed to display this descendant on the form. Is displayed.
Next question itself:
How to organize it drag-and-drop? Although, as drag-and-drop works, I know, the problem itself is in accessing the ancestor event OnMouseDown , etc.
We inherited the TShape object, how to address its events?
procedure TForm1.Shape1MouseMove(....), which can be assigned to the objectOp: TOperation;in the form ofOp.OnMouseMove:=Shape1MouseMove;or in Object Inspectore (if your component was installed in the palette ...). - Yura Ivanov