How do you cause text to blink??

M

Marshall Barton

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.
 
D

Dirk Goldgar

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.
 
D

DubboPete

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
 
M

Marshall Barton

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.
 
D

Dirk Goldgar

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top