Buscar

Efeito legal no caption do form

Código

Unit Unit1;
 
interface
 
uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls;
 
type
  TForm1 = class(TForm)
  Timer1: TTimer;
  procedure Timer1Timer(Sender: TObject);
  procedure FormShow(Sender: TObject);
  private
  { Private declarations }
  WGiro : Integer;
  WMesage : String;
  public
  { Public declarations }
  end;
 
var
  Form1: TForm1;
 
implementation
 
{$R *.DFM}
 
procedure TForm1.Timer1Timer(Sender: TObject);
begin
 Form1.Caption := WMesage;
 Case WGiro of
  1: begin
  if Length(WMesage)<= 1 then
  begin
  WMesage := ' W';
  WGiro := (WGiro + 1);
  end;
  WMesage := Copy(WMesage, 2,250);
  end;
 
  2: begin
  if Length(WMesage)<= 2 then
  begin
  WMesage := ' I';
  WGiro := (WGiro + 1);
  end;
  WMesage := Copy(WMesage, 3,250);
  end;
 
  3: begin
  if Length(WMesage)<= 3 then
  begin
  WMesage := ' L ';
  WGiro := (WGiro + 1);
  end;
  WMesage := 'W' + Copy(WMesage, 4,250);
  end;
 
  4: begin
  if Length(WMesage)<= 4 then
  begin
  WGiro := (WGiro + 1);
  end;
  WMesage := 'WI' + Copy(WMesage, 5,250);
  end;
 
  5: begin
  if Length(WMesage)<= 5 then
  begin
  WGiro := 1;
  end;
  WMesage := 'WIL' + Copy(WMesage, 6,250);
  end;
 end;
end;
 
procedure TForm1.FormShow(Sender: TObject);
begin
 Timer1.Enabled := True;
 WMesage := ' ';
 WGiro := 1;
end;
 
end.

Publicidade

Vote na dica




Quantidade de votos: 0 votos
Aceitação: 0%


Detalhes da dica

Categoria: Forms
Adicionada dia: 12/06/03
Por: Felipe Monteiro
Visualizada: 3503 vezes

Planeta Delphi - Tudo sobre programação Delphi Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009