Re: making a form transparent
- From: "Heinrich Wolf" <invalid@xxxxxxxxxxxxxxx>
- Date: Thu, 21 Jul 2005 09:29:43 +0200
Hi,
as others already suggested:
- don't call the timer each 1 msec
- use the visible property
"anthony" <mrmclarge@xxxxxxxxxxx> schrieb im Newsbeitrag
news:DwXCe.1529$PL5.186359@xxxxxxxxxxxxxxxxxx
....
> here is the timers code
>
> procedure TForm1.Timer1Timer(Sender: TObject);
> begin
> / timer1 is set to 5 secs
>
these variables are not necessary (*
> max:=50; /max time to display in milliseconds
> count:=0; /just a counter to count the milliseconds
*)
timer2.interval := 50;
> timer2.Enabled:=true; /turn on timer2
> timer1.Enabled:=false; /turn off timer1
> label1.Caption:='hi there'; /set the message to be displayed
label1.visible := true;
>
>
> end;
>
> procedure TForm1.Timer2Timer(Sender: TObject);
> begin
>
> / timer2 is set to 1 millisecond
1 msec means heavy load, not necessary!
clear these lines (*
> count:=count+1; /increment the counter
> if count>=max then /has it reached 50?
*)
> begin
label1.visible := false;
perhaps even faster and instead of (*
> label1.Caption:=' '; /clear the message
*)
> timer2.Enabled:=false; /turn timer2 off
> timer1.Enabled:=true; /turn timer1 back on for the next five secounds
> end;
....
.
- References:
- making a form transparent
- From: anthony
- Re: making a form transparent
- From: Heinrich Wolf
- Re: making a form transparent
- From: anthony
- making a form transparent
- Prev by Date: Re: Execute Stream?
- Next by Date: Re: percentage
- Previous by thread: Re: making a form transparent
- Next by thread: Re: making a form transparent
- Index(es):