Ver Mensaje Individual
  #7  
Antiguo 18-12-2009
Avatar de Aleca
Aleca Aleca is offline
Miembro
 
Registrado: may 2003
Ubicación: Venado Tuerto, Argentina
Posts: 277
Reputación: 22
Aleca Va por buen camino
Código Delphi [-]
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls;
type
  TForm1 = class(TForm)
    Timer1: TTimer;
    Label1: TLabel;
    Button1: TButton;
    procedure Timer1Timer(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    cTexto: String;
    nLargoMarq: Integer;
  public
    { Public declarations }
  end;
var
  Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
  i: Byte;
  nLarTexto: Byte;
begin
  cTexto := 'Hola Mundo';
  nLargoMarq := 50;
  nLarTexto := Length(cTexto);
  for i := 1 to nLargoMarq - nLarTexto do
    Insert(' ', cTexto, 0);
  Label1.Caption := cTexto;
  Timer1.Interval := 100;
  Timer1.Enabled := True;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
  cChar: String[1];
begin
  cChar := copy(cTexto, 1, 1);
  Delete(cTexto, 1, 1);
  cTexto := cTexto + cChar;
  Label1.Caption := cTexto;
  Label1.RePaint;
end;
end.
fijate si te sirve.
__________________
Aleca
Responder Con Cita