Code to flash a lable in windows application using timer

Karthikanbarasan
Posted by Karthikanbarasan under Windows Forms category on | Points: 40 | Views : 2363
This code show how to flash a label in windows application using timer

Private Sub frmBlinkScreen_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.lblLablel.Text = "This is the text to blink!!!!"
CallTimer()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Me.lblLablel.Visible = Not Me.lblLablel.Visible
End Sub

Public Sub CallTimer()
Timer1.Start()
Timer1.Interval = 500
End Sub

Comments or Responses

Login to post response