unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TForm1 =
class(TForm)
Image1 : TImage;
Label1 : TLabel;
procedure Image1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
procedure Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
FCursor : TCursor;
procedure SetCursor(Value: TCursor);
public
{ Public declarations }
function GetCursor: TCursor;
property Cursor: TCursor
read FCursor
write SetCursor;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure ControlMouseMove(aCtrl : TObject;
Button : TMouseButton;
Shift : TShiftState;
X : Integer;
Y : Integer);
begin
if Button = mbLeft
then
end;
procedure TForm1.SetCursor(Value: TCursor);
begin
FCursor := Value;
end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
FCursor := 0;
end;
function TForm1.GetCursor;
begin
Result := FCursor;
end;
procedure TForm1.Image1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
Var
Button : TMouseButton;
begin
ControlMouseMove(Image1, Button, Shift, X, Y)
end;
procedure TForm1.Image1MouseUp(Sender: TObject;
Button: TMouseButton;
Shift: TShiftState;
X,
Y: Integer);
begin
FCursor := 0;
end;
end.