I have a Delphi program which contains the following code:
procedure TForm1.Shape1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
<code here>
end;
Thing is, I want the exact same code for all 20 shapes. How do I go around doing this effectively? Thanks!
OnMouseDownevent handler to be the common event handler. This will assign the same event handler to all 20 selected shapes.(Sender as TShape).