1. Home
  2. Computing & Technology
  3. Delphi Programming

Mouse Eyes
Fancy Delphi Application Contest Entry #4 by Graeme Foot

By Zarko Gajic, About.com

Mouse Eyes - Fancy Delphi Application Contest Entry #4

Mouse Eyes - Fancy Delphi Application Contest Entry #4

Argh! Where's my mouse? Ah look at the eyes .... there it is! ;)) Mouse Eyes is another mouse cursor follower. Mouse eyes idea is indicating which direction to look in to find your mouse cursor. A great idea for the Fancy Delphi Application Contest.

Rate this FDAC Entry!

Mouse Eyes

Here's how to use Mouse Eyes
  • Starting the app will display the eyes at the centre of the screen.
  • You can click-n-drag the eyes to move then.
  • You can close the app by right-clicking and selecting Exit.
  • The position of the eyes will be remembered the next time the app is run.
Some of its features: Here's just a sneak peak into the source of this fabulous little Delphi application:
procedure TfrmMain.FormPaint(Sender: TObject) ;
const
  LEFT_EYE : TRect = (Left:24; Top:8; Right:50; Bottom:38) ;
  RIGHT_EYE : TRect = (Left:52; Top:8; Right:78; Bottom:38) ;
begin
  // draw eyes
  Canvas.Brush.Color := clWhite;
  Canvas.Brush.Style := bsSolid;
  Canvas.Pen.Color := clBlack;
  Canvas.Pen.Style := psSolid;
  Canvas.Pen.Width := 1;

  Canvas.Ellipse(LEFT_EYE) ;
  Canvas.Ellipse(RIGHT_EYE) ;


  // draw pupils
  Canvas.Brush.Color := clBlack;
  Canvas.Brush.Style := bsSolid;
  Canvas.Pen.Style := psClear;

  // left Eye
  drawPupil(LEFT_EYE) ;

  // right Eye
  drawPupil(RIGHT_EYE) ;
end;
Of course, the "drawPupil" method is what's interesting. Download the full source code to explore. Or, just the EXE to have some fun!

"Mouse Eyes" was submitted by "Graeme Foot".

Do you have a FDA(C)? Submit your Delphi code to the Fancy Delphi Application Contest.

Zarko Gajic
Guide since 1998

Zarko Gajic
Delphi Programming Guide

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Using VCL Components
  5. TMouse
  6. Mouse Eyes - Fancy Delphi Application Contest Entry #4

©2009 About.com, a part of The New York Times Company.

All rights reserved.