How do you cause text to blink??

  • Thread starter Thread starter Brad Pears
  • Start date Start date
Brad said:
I have a label that I want to have blinking. How do you do that?

Use the form's Timer event to change the label's properties.

Please note that flashing is considered to be a bad UI
design.
 
Brad Pears said:
I have a label that I want to have blinking. How do you do that?

Use the form's Timer event to toggle the label's Visible property. But
I beseech you not to do this unless you really have to, and if you must,
either turn it off after a short period, or provide a quick way for the
user to turn it off. Blinking text is really annoying.
 
Hi Dirk, et al

Good answer to start the blinking, but how do you then program the 'turn it
off after a short period' bit?

....just taking it to the next level...

DubboPete
 
DubboPete said:
Good answer to start the blinking, but how do you then program the 'turn it
off after a short period' bit?


Set the form's TimerInterval property to a Long positive
number (the number of milliseconds you want for the blinking
interval) to turn it on.

Set the TimerInterval to 0 to turn it off.
 
Marshall Barton said:
Set the form's TimerInterval property to a Long positive
number (the number of milliseconds you want for the blinking
interval) to turn it on.

Set the TimerInterval to 0 to turn it off.

Just what I was going to say. :-)

You can have a Static variable in the Timer event procedure that you use
to count the number of times the event has fired. When that count
reaches a certain number "n", you can set both the TimerInterval to 0
and that count to 0. You need to pick some event to turn the blink back
on again by setting the TimerInterval to a nonzero value, after which it
will blink "n" times and turn off.
 
Back
Top