Ver Mensaje Individual
  #6  
Antiguo 26-04-2010
cloayza cloayza is offline
Miembro
 
Registrado: may 2003
Ubicación: San Pedro de la Paz, Chile
Posts: 915
Reputación: 23
cloayza Tiene un aura espectacularcloayza Tiene un aura espectacular
A ver si esto te sirve...


Código Delphi [-]
var
  Form1: TForm1;

implementation

{$R *.DFM}

{ Debes colocar los siguientes objetos en tu form
label1
Button1
Button2
Timer1
}

Const
   FText:Array[1..5] Of String=('Primer Texto','Segundo Texto','Tercer Texto','Cuarto Texto','Quinto Texto');

procedure TForm1.Button1Click(Sender: TObject);
begin
     Button1.Tag:=Button1.Tag+1;

     If Button1.Tag>5 Then
        Button1.Tag:=1;

     If Not Timer1.Enabled Then
        Timer1.enabled:=True;

     Timer1.Tag:=0;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
     Timer1.Tag:=Timer1.Tag+1;

     If Timer1.Tag>Length(FText[Button1.Tag]) Then Timer1.Tag:=1;
     label1.caption:=Copy(FText[Button1.Tag], 1, Timer1.Tag);

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
     Timer1.Enabled:=False;
end;
Responder Con Cita