Es que la idea no es heredarlo de tu form, sino del TAnimate... Si lees atentamente lo que he escrito anteriormente esta todo dicho!
Puedes crearlo en tiempo de ejecución si es que no quieres registrar un componente nuevo, haciendo algo como esto:
Código:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls;
type
TForm1 = class(TForm)
Animate1: TAnimate;
procedure FormCreate(Sender: TObject);
private
procedure MiAnimateClick(Sender: TObject);
public
end;
TMiAnimate = class(TAnimate)
published
property OnClick;
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
var
Animate1: TMiAnimate;
begin
Animate1 := TMiAnimate.Create(Self);
with Animate1 do
begin
Parent := Self;
CommonAVI := aviCopyFile;
OnClick := MiAnimateClick;
Active := True;
end;
end;
procedure TForm1.MiAnimateClick(Sender: TObject);
begin
ShowMessage('Pum...!');
end;
end.
Y sinó puedes hacer un cast de tu TAnimate a TMiAnimate, va a funcionar pero no soy muy partidario de este tipo de prácticas
Saludos!