Scrolling Text using Timer in VB.Net
This tutorial demonstrates the animation of scrolling the text from bottom to top using Label and Timer.
Step 1:
Create a form and add a Label, In the Text Property, type any word that you want then set the Location Property to 49, 263.
Step 1:
Create a form and add a Label, In the Text Property, type any word that you want then set the Location Property to 49, 263.
Step 2:
Add a Timer Object
and set the Interval Property to 20, then paste this code:
Public Class frmScrollTextPrivate Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.TickLabel1.Location = New Point(Label1.Location.X, Label1.Location.Y - 1)If Label1.Location = New Point(94, -416) ThenLabel1.Location = New Point(94, 264)End IfEnd SubEnd Class
Final Output:
Scrolling Text using Timer in VB.Net
Reviewed by code-dev
on
10:23 PM
Rating:
No comments: