unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, System.ComponentModel, Borland.Vcl.ExtCtrls;

type
  TForm1 = class(TForm)
    Shape1: TShape;
    procedure Shape1MouseLeave(Sender: TObject);
    procedure Shape1MouseEnter(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.nfm}

procedure TForm1.Shape1MouseEnter(Sender: TObject);
begin
Shape1.Brush.Color:=clRed;
Shape1.Shape:=stRectangle;
end;

procedure TForm1.Shape1MouseLeave(Sender: TObject);
begin
Shape1.Brush.Color:=clYellow;
Shape1.Shape:=stEllipse;
end;

end.
