Bret:
Good points, and yes, there are multiple properties that you can manipulate
to create a blinking effect. Personally, I tend to use the approach you
mention setting the property to it's opposite when state can only be one of
two conditions. However, I have run into occassions where the behavior
might need to be temporarily changed and other properties may need to be
changed based on that change, hence the module level variable. I think for
this issue though, your approach is definitely cleaner.
Cheers,
Bill
"Bret Pehrson" <br**@infowest.com> wrote in message
news:40***************@infowest.com...
I'd recommend rather than toggling the visibility, toggling the enabled
state, that way it flashes from black to gray to black, similar effect, but the
text is always visible.
No need to store the state separately, just use the following:
label.Enabled = !label.Enabled;
in response to the timer event.
William Ryan eMVP wrote:
without stating my opinion on blinking things in a UI...
Add a timer control to your form and then whenever you want it to start
blinking, set it's enabled property to true. In the timer's tick event,
set it to visible if visible is false and set visible to false if it's true.
You can use a Static module level variable and just set the visible
property to the boolean variable....and just change the bool's value with each
tick.
HTH,
Bill
"Mystery Man" <Pr************@hotmail.com> wrote in message
news:87*************************@posting.google.co m... I want to deliberately make a label (and perhaps a button) flash to
alert the user that something very serious has happened.
Any ideas on how to do this?
--
Bret Pehrson
mailto:br**@infowest.com
NOSPAM - Include this key in all e-mail correspondence <<38952rglkwdsl>>