Blink label's text

  • Thread starter Thread starter Bharathi Kumar
  • Start date Start date
B

Bharathi Kumar

Hi,

How can I get a blinking text for a lable.


Iam working in a window appln using framework 2.0 and VS 2005.


Thanks in advance,
Bharti Kumar.
 
You can add a Timer Control to your form, set the desired interval, and then
write some code like thie following in the "elapsed" event:


If myLabel.ForeColor = Color.Black Then
myLabel.ForeColor = Color.Red
Else
myLabel.ForeColor = Color.Black
End If

Hope this helps,

Joris
 
Bharathi said:
Hi,

How can I get a blinking text for a lable.


Iam working in a window appln using framework 2.0 and VS 2005.


Thanks in advance,
Bharti Kumar.

My first question is why on earth would you want to do such a thing?

However that aside if you really must then remember the suggestion
above requires a postback for the code to execute which hardly seems
practical given the description you've given.

You should take a look at AJAX.
 
above requires a postback for the code to execute which hardly seems

He made no mention of a web app. He is building a Windows app.

After setting the color of the label, call the .Refresh method to
update the label on the form.

But I agree with Richard, most people find a blinking label to be
annoying.
 
Hi,

Thank you very much for replies.

My project is a desktop application. I mentioned it in the question
clearly.

I have some graphics in my project and I need to highlight the current
activity going on.

If its blinking it catches the attention. A plane text may not do
better I think.


Thanks and Regards,
Bharathi Kumar.
 
Back
Top