Flashing text

ukjock

Active member
Joined
Dec 10, 2003
Messages
35
Location
Scotland
Can somebody please help me on how to make text flash using a timer.

Is using a timer the ideal way or is there an easier way!?

I wanted to use:

Code:
If Label2.ForeColor.Red Then Label2.ForeColor.Empty() Else Label2.ForeColor.Red()

but i get system.color can not converted to Boolean.

Can somebody please help me... I am pulling my hair out!

Regards

Chris
 
Originally posted by ukjock
Can somebody please help me on how to make text flash using a timer.

Is using a timer the ideal way or is there an easier way!?

I wanted to use:

Code:
If Label2.ForeColor.Red Then Label2.ForeColor.Empty() Else Label2.ForeColor.Red()

but i get system.color can not converted to Boolean.

Can somebody please help me... I am pulling my hair out!

Regards

Chris

try something like

Label2.ForeColor.white or Label2.ForeColor = Label2.backcolor instead of that empty statement
 
Seems easiest to me if you:
Dont do any flashing :)
OR
Clear the text and then reset it - always have the color as Red. To "save" the text, maybe put the text in the Tag property. Something like:
Code:
 Set this in the designer:
Label2.Color = Color.Red

 In your timer/wherever
If Label2.Text.Length = 0 Then
    Label2.Text = Label2.Tag.ToString()
Else
    Label2.Tag = Label2.Text
    Label2.Text = String.Empty
End If

-nerseus
 
Back
Top