.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Blink a Text using timer in vb.net

Posted By:satyapriyanayak       Posted Date: March 11, 2013    Points: 40    Category: Visual Studio    URL: http://www.dotnetspark.com  

Blink a Text using timer

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


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend