unit kurzor; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls; type TMarker=Object can:TCanvas; x,y:word; constructor Create; destructor Destroy; procedure Rajzol; procedure mozgat(ujx,ujy:word); end; TForm1 = class(TForm) Image1: TImage; procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; ma:TMarker; Image1: TImage; implementation {$R *.DFM} constructor TMarker.Create; begin x:=0; y:=0; can:=TCanvas.Create; end; destructor TMarker.Destroy; begin can.Free; end; procedure TMarker.Rajzol; begin can.MoveTo(x,y); can.LineTo(x,y+10); can.MoveTo(x,y); can.LineTo(x+10,y); can.MoveTo(x,y); can.LineTo(x+10,y+10); end; procedure TMarker.Mozgat(ujx,ujy:word); begin TMarker.Rajzol; x:=ujx; y:=ujy; Tmarker.Rajzol; end; procedure TForm1.FormCreate(Sender: TObject); begin ma.Create; ma.can:=Image1.Canvas; ma.can.Pen.Mode:=pmXOR; ma.can.Pen.Color:=clRed; ma.rajzol; Image1.Cursor:=-1; end; procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin ma.Mozgat(x,y); end; end.