Hola gaston.
Primero tengo que apuntar un error en el código y creo que no es de copiado, si no de 'fabrica' por que lo he visto igual en dos o tres lados.
La línea:
Código Delphi
[-]
lblMarquee.Caption:= Copy(txt, length(txt) -1, 1) + Copy(txt, 1, length(txt) -1);
Tendría que poner el último caracter al principio y agregarle el resto -1, pero pone el anteúltimo y le agrega el resto -1.
Debería ser:
Código Delphi
[-]
lblMarquee.Caption:= Copy(txt, length(txt), 1) + Copy(txt, 1, length(txt) -1);
Ahora con lo del sonido, se me ocurre algo así: (Reduje el código para simplificar, pero es completamente funcional en ambos sentidos)
Código Delphi
[-]
unit Unit1;
interface
uses
Windows, SysUtils, Forms, ExtCtrls, Classes;
type
TForm1 = class(TForm)
Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
FCaption: string;
public
end;
var
Form1: TForm1;
implementation {$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Caption:= 'prueba1234';
FCaption:= Caption;
Timer1.Interval := 1000 div 5;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
txt: string;
begin
txt:= Self.Caption;
Caption:= Copy(txt, length(txt), 1) + Copy(txt, 1, length(txt) -1);
if FCaption = Caption then
Windows.MessageBeep(MB_ICONEXCLAMATION);
end;
end.
Saludos.