Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   API de Windows (https://www.clubdelphi.com/foros/forumdisplay.php?f=7)
-   -   como usar el componente lblmarquee (https://www.clubdelphi.com/foros/showthread.php?t=69546)

gaston260 25-08-2010 02:21:43

como usar el componente lblmarquee
 
Hola amigos me gustaria poder saber cuando se llega al final del comentario en el componente lblmarquee que esta en rad studio para poder repetir un sonido cada vez que se repita el mensaje , tengo este codigo y e probado con eof pero nada !


Código Delphi [-]unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, Buttons;
type
TForm1 = class(TForm)
Timer1: TTimer;
btnStartStop: TButton;
BitBtn1: TBitBtn;
lblMarquee: TLabel;
edText: TEdit;
Label2: TLabel;
UpDown1: TUpDown;
edSpeed: TEdit;
Label1: TLabel;
rgDirection: TRadioGroup;
procedure BitBtn1Click(Sender: TObject);
procedure edTextChange(Sender: TObject);
procedure btnStartStopClick(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure UpDown1Changing(Sender: TObject; var AllowChange: Boolean);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
Close;
end;
procedure TForm1.edTextChange(Sender: TObject);
begin
lblMarquee.Caption := edText.Text;
end;
procedure TForm1.btnStartStopClick(Sender: TObject);
begin
Timer1.Enabled := not Timer1.Enabled;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var txt : string;
begin
txt:= lblMarquee.Caption;
if rgDirection.ItemIndex = 0 then //left
lblMarquee.Caption:= Copy(txt, 2, length(txt)-1) + Copy(txt,1,1)
else //right
lblMarquee.Caption:= Copy(txt,length(txt)-1,1) + Copy(txt, 1, length(txt)-1);
end;
procedure TForm1.UpDown1Changing(Sender: TObject;
var AllowChange: Boolean);
begin
Timer1.Interval := 1000 div UpDown1.Position;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
edTextChange(Self);
end;
end.




la unica diferencia es que uso un memo en vez de un edText

gracias de antemano amigos !


La franja horaria es GMT +2. Ahora son las 02:31:25.

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