How To Make Label Typing Effect In VB.NET


For this tutorials we will need a timer and a label and a public string and a public integer thats all we need to begin add a label and add a timer now lets go do coding i have written the codes so no need to write one by one

Public Class Form1

'Author : Mohamed Shimran
'Blog : http://www.ultimateprogrammingtutorials.blogspot.com

   Public str_ As String
    Public count_ As Integer
    
    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
        If Label1.Text.Length = str_.Length Then
            Timer1.Enabled = False
            Exit Sub
        End If
        Label1.Text = str_.Substring(0, count_)
        count_ = count_ + 1
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Label1.Text = ""
        count_ = 1
        str_ = "Hello :) This is shim - ultimate programming tutorials"
        Timer1.Enabled = True
    End Sub
End Class

here is a preview of what i have done

vb.net label

enjoy.

4 comments

This doesn't even work...

Reply

First off , congratulation on this post. this is really awesome There are some very great sources here and thank you for being so kind to post them here.
custom essay writing service

Reply

Post a Comment

Note: Only a member of this blog may post a comment.