Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   OOP (https://www.clubdelphi.com/foros/forumdisplay.php?f=5)
-   -   Creacion dinamica de un TAnimate (https://www.clubdelphi.com/foros/showthread.php?t=13594)

hermes_32 24-08-2004 18:51:58

Creacion dinamica de un TAnimate
 
Hola amigos. Como estais?
Mirad, tengo un problema al crear un TAnimate dinamicamente, y el problema esta en que no se me ejecuta el evento OnStop al terminar la secuencia avi.

Tengo el código siguiente:

Código:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Animate1: TAnimate;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    procedure Terminaya(Sender : Tobject);
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var Animacion : TAnimate;
begin
  Animacion := TAnimate.create(self);

  with Animacion do begin
  parent := self;
  parentcolor := False;
  FileName := ruta del avi;
  StartFrame := 1;
  StopFrame := 8;
  CommonAVI := aviNone;
  Repetitions := 1;
  top := 10;
  left := 50;
  visible := True;
  Transparent := false;
  color := clWhite;
  onStop := Terminaya;
  active := True;
  end;
end;

procedure TForm1.Terminaya(Sender: Tobject);
begin
  showmessage('ya se ha terminado');
end;

end.

No se cual es el problema pero cuando termina el avi, no sale el mensaje que tiene que salir. Qué estoy haciendo mal?

Gracias por la atención.


La franja horaria es GMT +2. Ahora son las 14:17:40.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi