Text blink.

  • Thread starter Thread starter Minseok
  • Start date Start date
M

Minseok

I need some kind of blinking label;
Text of Label,"Caution", should be blinked.
How can I do this?
Thanks in advance.
 
What you can do is start a timer and on each timer tick make the label
either visible or not visible.

For instance, something like this:

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

myTimer = new System.Windows.Forms.Timer();
myTimer.Interval = 200; // any value you like (in ms)
myTimer.Tick +=new EventHandler(TimerEventProcessor);
}


// This is the method to run when the timer is raised.
private void TimerEventProcessor(Object myObject, EventArgs myEventArgs)
{
labelCaution.Visible = ! labelCaution.Visible;
}

Whenever you want to start the blinking set myTimer.Enabled to true.
 
Minseok said:
I need some kind of blinking label;
Text of Label,"Caution", should be blinked.
How can I do this?
Thanks in advance.

Why not writing your own Label. Inherit from a Label and put in it a
Timer which changes the Text of the Label every 500 ms or so.

Greets

Jens
 
Back
Top