Animation - Blinking and Changing Color Effects of Text (VB.NET)
Submitted by donbermoy on Monday, May 18, 2015 - 21:57.
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.
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.
Lastly, we will code for the Form_Load. We will just start the timer here.
- Dim i As Integer = 0
- Dim j As Integer
- 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
- Else
- i = 0
- DspLabel1.Text = ""
- End If
- j = 1
- Else
- j = 0
- DspLabel1.ForeColor = Color.Red
- End If
- End Sub
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- Timer1.Start()
- End Sub
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/BermzISwareAdd new comment
- 1018 views