|
This is the first graphic example. This one draws circles as mouse
move around the form. To code this simple drawing program you only
have to write single line. Enjoy the power of graphics in Delphi
as you progress by reading this tutorial section.

Only
you have to do is go to the form events page. Setup the FormMouseMove
event as follows
procedure
TForm1.FormMouseMove(Sender: TObject; Shift:
TShiftState; X, Y: Integer);
begin
Form1.Canvas.Ellipse(X-15,Y-15,X+15,Y+15);
end;
In
here number 15 is the size of the circle. You can set it as to your
requirement.
DOWNLOAD this example
Click
here
to download this complete example for Delphi 6. (File size 6KB)

|