Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BLINKING LABEL CAPTION WITHOUT USING TIMER

Status
Not open for further replies.

ameen

Programmer
Jun 24, 2001
32
IN
Hello,
Can any one give me some suggession whether it is possible to blink a label caption without using timer. If yes, I would appreciate for any suggession.

Thank you. Regards

Ameen
 
One possible way (although I do not know how well it would work) would be to use a couple of loops and apllication.processmessage:

Code:
   for loop1 := 1 to NO_OF_BLINKS do
   begin
      for loop2 := 1 to DELAY do
      begin
       Application.ProcessMessages;
      end;
      label1.visible:= not(label1.visible);
   end

[code]

X-)
 Billy H

bhogar@acxiom.co.uk
 
I would not recommend this because it will blink different depending the CPU usage.

I would create a new TMyLabel with an built in timer.
Andreas Nordlund
Software developer
 
Making a label with a built in timer could be bad if you're using Win95 or Win98. You can only have so many timers at a time in those OS's, and I can see you accidentally exceeding your limit with blinking labels quickly. :)

Perhaps you could make a TTimer descendant that had as a property a list of label controls that you want to blink. Then one timer could manage multiple blinking labels.

Just a thought. Windows doesn't really handle blinking that well. DOS kind of had it built in to the color scheme. TealWren
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top