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.
- Dim i As Integer = 0
- 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.
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- Dim str As String = " Developed By Engr. Lyndon R. Bermoy "
- Dim c(str.Length) As Char
- c = str.ToCharArray
- If j = 0 Then
- DspLabel1.ForeColor = Color.Blue
- If i < str.Length Then
- DspLabel1.Text = DspLabel1.Text & c(i)
- i = i + 1
- i = 0
- DspLabel1.Text = ""
- End If
- j = 1
- j = 0
- DspLabel1.ForeColor = Color.Red
- End If
- End Sub
Lastly, we will code for the Form_Load. We will just start the timer here.
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- End Sub
For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below.
Engr. Lyndon Bermoy
IT Instructor/System Developer/Android Developer/Freelance Programmer
Add and Follow me on Facebook: https://www.facebook.com/donzzsky
Visit and like my page on Facebook at: https://www.facebook.com/BermzISware