Fórum Texto andando no caption do Form #213834
13/02/2004
0
O Codigo que eu coloquei é este...
procedure TFormPrincipal.Timer1Timer(Sender: TObject); Var A : String; Fim : Boolean; Letra : integer; begin If (Letra = Length(A)+1) Then Begin Letra := 0; End Else Begin A:= ´Fabio´; FormPrincipal.caption:=Copy(A,Letra+1,Letra+1); inc(Letra); End;
A Varialvel letra .. na incremente... nao sei pq....!!!!!
se puderem me ajudar agradeço
Pantoja
Curtir tópico
+ 0Posts
13/02/2004
Maxwell_monteiro
Gostei + 0
13/02/2004
Maxwell_monteiro
Gostei + 0
13/02/2004
Fabio.hc
Troque esta linha:
por esta:
Gostei + 0
13/02/2004
Wagner
procedure TForm1.Timer2Timer(Sender: TObject); Var Texto: String; begin texto := label8.Caption; label8.Caption := Copy(Texto, 2, Length(Texto))+Texto[1]; end;
Gostei + 0
13/02/2004
Marcelo Saviski
var n: Integer = 0; //global
num Timer:
begin Inc(n); Form.Caption := stringofchar(n mod 200, ´ ´) + ´caption do form´; end;
mude o 200 para trocar a posição aonde o capion termina
Gostei + 0
13/02/2004
Juarezber
Var S: String; begin S:= LabelMensagem.Caption; LabelMensagem.Caption:= Copy(S,2,Length(S)-1) + Copy(S,1,1); end;
Juarezber
Gostei + 0
13/02/2004
Juarezber
procedure TForm1.Timer1Timer(Sender: TObject); Var S: String; begin S:= Form1.Caption; Form1.Caption:= Copy(S,2,Length(S)-1) + Copy(S,1,1); end;
Escreva uma mensagem no caption do form.
Juarezber
Gostei + 0
14/02/2004
Pantoja
por isso é q gosto de vcs.... :wink:
Gostei + 0
14/02/2004
Pantoja
esse codigo é bem compacto.. gostei...
mas alguém pode me esplicar esse codigo... :roll:
Gostei + 0
14/02/2004
Fabio.hc
procedure TForm1.Timer1Timer(Sender: TObject); begin Text:=Copy(Text,2,Length(Text)-1) + Copy(Text,1,1); end;
Gostei + 0
14/02/2004
Fórum Vini
procedure TForm1.Timer1Timer(Sender: TObject); begin Text:=Copy(Text,2,Length(Text)-1) + Copy(Text,1,1); end;
Corrigindo um detalhe:
procedure TForm1.Timer1Timer(Sender: TObject); begin Caption:=Copy(Caption,2,Length(Caption)-1) + Copy(Caption,1,1); end;
Gostei + 0
14/02/2004
Fabio.hc
Form1.[b:0750be9ac1]Caption[/b:0750be9ac1] -> TCpation
O efeito é o mesmo.
Gostei + 0
14/02/2004
Wagner
procedure TForm1.Timer2Timer(Sender: TObject); Var Texto: String; begin texto := label8.Caption; label8.Caption := Copy(Texto, 2, Length(Texto))+Texto[1]; end;
Eu tenho esse codigo, mais eu queria saber como o texto pode da uma paradinha quando aparecer completo no no caption e depois andar novamente
Gostei + 0
15/02/2004
Fabio.hc
var Form1: TForm1; Var_Aux: String; procedure TForm1.FormCreate(Sender: TObject); begin Var_Aux:=Label8.Caption; end; procedure TForm1.Timer1Timer(Sender: TObject); var Texto: String; begin texto := label8.Caption; if (texto = Var_Aux) then Timer1.Interval:=5000 else Timer1.Interval:=1000; label8.Caption := Copy(Texto, 2, Length(Texto))+Texto[1]; end;
Ex: Label8.caption:=´ Texto andando no caption do Label´, começando com espaço.
Gostei + 0
16/02/2004
Pantoja
Bem coloca um if assim
if Var_Aux = ´ Fabio´ then For i := 1 to 10000; // este for faz esperar um certo tempo
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)