Blink a Text in vb.net

Satyapriyanayak
Posted by Satyapriyanayak under VB.NET category on | Points: 40 | Views : 1664
In this Code Snippet we will know how to blink a Text.Drag and drop one Timer control and one Label control to the form. 

Public Class Form1
Dim i As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.Enabled = True
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
i += 1
If i = 10 Then
Label1.Text = "Blink a Text in vb.net"
Label1.ForeColor = Color.Red
ElseIf i = 20 Then
Label1.Text = ""
i = 0
End If
End Sub
End Class

Comments or Responses

Login to post response