Demonstrate how to use FormMouseMove event to draw circles
Simple Delphi graphic program demonstrate how to use FormMouseMove event to draw circles on form.
Bookmark:
Demonstrate how to use FormMouseMove event to draw circles
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;
Download This Delphi Tutorials.
Download materials for this article (Delphi - Tutorials)
FormMouseMove-Draw-Circle.zip
File size: 6 KB, File type: zip
Total downloads: 384, Upload date: February 10 - 2009
Akura :: January 27-2010 :: 11:52 AM
So simple and effective! Amazing.