unit FlatImage;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls;
type
TFlatImage = class(TImage)
private
{ Private declarations }
FOnMouseEnter : TNotifyEvent;
FOnMouseLeave : TNotifyEvent;
ImageActive:Boolean;
FImageMovePixel:Integer;
function GetCanvas : TCanvas;
procedure CMMouseEnter(var Message : TMessage); message CM_MOUSEENTER;
procedure CMMouseLeave(var Message : TMessage); message CM_MOUSELEAVE;
protected
{ Protected declarations }
procedure MouseEnter; dynamic;
procedure MouseLeave; dynamic;
public
{ Public declarations }
constructor Create(AOwner : TComponent); override;
property Canvas : TCanvas read GetCanvas;
published
{ Published declarations }
property OnMouseEnter : TNotifyEvent read FOnMouseEnter
write FOnMouseEnter;
property OnMouseLeave : TNotifyEvent read FOnMouseLeave
write FOnMouseLeave;
property ImageMovePixel:Integer read FImageMovePixel
write FImageMovePixel;
end;