| Exibir mensagem anterior :: Exibir próxima mensagem |
| Autor |
Mensagem |
RafaelBg Novato

Registrado: Quinta-Feira, 5 de Agosto de 2004 Mensagens: 62
|
Enviada: Qua Nov 14, 2007 6:01 pm Assunto: Criar eventos em tempo de execução |
|
|
Boa tarde a todos
Estou tentando criar um evento em tempo de execução. Eu preciso mostrar uma msg na tela e após determinado tempo preciso que o formulario feche.A função é esta ai em baixo. Gostaria de criar um evento tipo onshow.. que após algum tempo ele fechasse o form.
| Código: | procedure Msg(sLinha1, sLinha2, sLinha3, sLinha4: string);
var
Frmmsg: TForm;
lblinha01, lblinha02, lblinha03, lblinha04: TLabel;
iEsperar:integer;
begin
iEsperar:=0;
Frmmsg := Tform.create(application);
lblinha01 := TLabel.create(frmmsg);
lblinha02 := TLabel.create(frmmsg);
lblinha03 := TLabel.create(frmmsg);
lblinha04 := TLabel.create(frmmsg);
with Frmmsg do
begin
Left := 324;
Top := 212;
Width := 366;
Height := 149;
Caption := '';
Color := clBtnFace;
Font.Charset := DEFAULT_CHARSET;
Font.Color := clWindowText;
Font.Height := -11;
Font.Name := 'Courier New';
Font.Style := [];
OldCreateOrder := False;
PixelsPerInch := 96;
BorderStyle:=bsNone;
Position:=poDesktopCenter;
OnCreate:=FechaFrm;
end;
with lblinha01 do
begin
Parent:=frmmsg;
Left := 14;
Top := 8;
Width := 63;
Height := 14;
Caption := sLinha1;
end;
with lblinha02 do
begin
Parent:=frmmsg;
Left := 14;
Top := 34;
Width := 63;
Height := 14;
Caption :=sLinha2;
end;
with lblinha03 do
begin
Parent:=frmmsg;
Left := 14;
Top := 61;
Width := 63;
Height := 14;
Caption :=sLinha3 ;
end;
with lblinha04 do
begin
Parent:=frmmsg;
Left := 14;
Top := 88;
Width := 63;
Height := 14;
Caption := sLinha4;
end;
Frmmsg.Showl;
end; |
obrigado |
|
| Voltar ao Topo |
|
 |
Borland_Linuxer Moderador

Registrado: Terça-Feira, 11 de Outubro de 2005 Mensagens: 4252 Localização: Manaus - Am
|
|
| Voltar ao Topo |
|
 |
RafaelBg Novato

Registrado: Quinta-Feira, 5 de Agosto de 2004 Mensagens: 62
|
Enviada: Qui Nov 15, 2007 12:09 pm Assunto: |
|
|
Agradeço a resposta, era isso que eu precisa!!
obrigado |
|
| Voltar ao Topo |
|
 |
|