procedure TForm1.FormMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
Canvas.Ellipse(x-20,y-20,x+20,y+20);
end;
procedure TForm1.FormMouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
begin
case Button of
mbLeft:
begin
Canvas.Brush.Color := clRed;
Canvas.Ellipse(x-20,y-20,x+20,y+20);
end;
mbRight:
begin
Canvas.Brush.Color := clBlue;
Canvas.Rectangle(x-20,y-20,x+20,y+20);
end;
end;
end;
procedure TForm1.FormMouseMove(Sender: TObject;
Shift: TShiftState; X,Y: Integer);
begin
if ssShift in Shift then
Canvas.Ellipse(x-20,y-20,x+20,y+20)
else if ssCtrl in Shift then
Canvas.Rectangle(x-20,y-20,x+20,y+20);
end;