by Ranjan Biswal & Mainak chatterjee (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 29th November 2000
Date Added: Mon 8th February 2021
Rating: (1 Votes)
It animates text in the title bar of form.Also in this program we have given a scrolling effect to a text in a label
API Declarations
Dim mlen As Integer
Dim ctr As Integer
Dim str1, str2, str3, str4, str5, str6, str7 As String
Dim sctr As Integer
'Add a label and set its alignment to center
Private Sub Form_Load()
Form1.Caption = "VISUAL BASIC"
sctr = 0
msg = "VISUAL BASIC IS FUN"
mlen = Len(msg)
ctr = 0
Label1.Caption = msg
End Sub
Private Sub Timer1_Timer()
Label1.Caption = Left(msg, ctr)
ctr = ctr + 1
If ctr = mlen + 1 Then
ctr = 0
End If
End Sub
Private Sub Timer2_Timer()
str1 = "VISUAL BASIC"
str2 = "V I S U A L B A S I C"
str3 = "V I S U A L B A S I C"
str4 = "V I S U A L B A S I C"
str5 = "V I S U A L B A S I C"
str6 = "V I S U A L B A S I C"
str7 = "V I S U A L B A S I C"
If sctr = 1 Then
Form1.Caption = str7
ElseIf sctr = 2 Then
Form1.Caption = str6
ElseIf sctr = 3 Then
Form1.Caption = str5
ElseIf sctr = 4 Then
Form1.Caption = str4
ElseIf sctr = 5 Then
Form1.Caption = str3
ElseIf sctr = 6 Then
Form1.Caption = str2
ElseIf sctr = 7 Then
Form1.Caption = str1
sctr = 0
End If
sctr = sctr + 1
End Sub
No comments have been posted about It animates text in the title bar of form.Also in this program we have given a scrolling effect to . Why not be the first to post a comment about It animates text in the title bar of form.Also in this program we have given a scrolling effect to .