vijay

welcome Netizen

Share Your Knowledge.It is a way to achieve immortality

Tuesday, March 1, 2011

How to Blink a label in an form using VB.NET?


INTRODUCTION:

In this articles i give some tips to make a form more attractive,By using this type of technique you can easily attract customers..
when i googled i found this easy methods to blink a label in an form.

Description:
For that you have to add one time control to your form and follow this code....

Enter in from load...
 Private Sub startprocess_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Timer1.Interval = 500
        Timer1.Start()
    End Sub



 Private Sub InitTimer()
        Dim timer As New Timer()
        timer.Interval = 3000
        AddHandler timer.Tick, AddressOf Blink
        timer.Start()
    End Sub




    Private Sub Blink(ByVal sender As Object, ByVal e As EventArgs)
        Dim visible As Boolean = Label1.Visible
        If visible Then
            Label1.Visible = False
        Else
            Label1.Visible = True
        End If
    End Sub



Enter this one  timer click ..


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

i hope this one helpful to you ..even if you know any easy methods to do.. plz share with us......

2 comments:

Unknown said...

Hi

i tried the above code. but in Timer1.Start()
.Start() is not coming in intellisense. plz help me

vijay said...

hi i made some changes on the code ...now you can refer it

Post a Comment