|
Delphi
Tutorial Graphics - Show flowers as user move mouse.
Use system timer to put flowers randomly on desktop.
procedure
TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
{
Set new image position at cursor }
Image1.Top
:= Mouse.CursorPos.Y - Round(Image1.Height / 2);
Image1.Left
:= Mouse.CursorPos.X - Round(Image1.Width / 2);
end;
DOWNLOAD this example
Click
here
to download this complete example for Delphi 6. (File size 33KB)

|