Animation - Blinking and Changing Color Effects of Text (VB.NET)

This tutorial will teach you how to create a program that has a blinking and changing color of the texts using vb.net. Now, let's start this tutorial! 1. Let's start with creating a Windows Form Application for this tutorial by following the following steps in Microsoft Visual Studio: Go to File, click New Project, and choose Windows Application. 2. Next, add only one label named DspLabel1 and one timer named Timer1. 3. Now, let's do the coding. First, we will have to declare some variables that we will use.
  1. Dim i As Integer = 0
  2. Dim j As Integer
For our main code, we will prefer to code for the Tick Event of the timer. We will have the forecolor blue and red for our blinking effect and a moving text from right to left. Put any words also on the string.
  1. Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  2.  
  3. Dim str As String = " Developed By Engr. Lyndon R. Bermoy "
  4. Dim c(str.Length) As Char
  5. c = str.ToCharArray
  6. If j = 0 Then
  7. DspLabel1.ForeColor = Color.Blue
  8. If i < str.Length Then
  9. DspLabel1.Text = DspLabel1.Text & c(i)
  10. i = i + 1
  11. Else
  12. i = 0
  13. DspLabel1.Text = ""
  14. End If
  15. j = 1
  16. Else
  17. j = 0
  18. DspLabel1.ForeColor = Color.Red
  19. End If
  20. End Sub
Lastly, we will code for the Form_Load. We will just start the timer here.
  1.  
  2. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  3. Timer1.Start()
  4. End Sub

Output:

output For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below. Best Regards, Engr. Lyndon Bermoy IT Instructor/System Developer/Android Developer/Freelance Programmer Mobile: 09488225971 Landline: 826-9296 E-mail:[email protected] Add and Follow me on Facebook: https://www.facebook.com/donzzsky Visit and like my page on Facebook at: https://www.facebook.com/BermzISware

Add new comment