It animates text in the title bar of form.Also in this program we have given a scrolling effect to
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
Rate It animates text in the title bar of form.Also in this program we have given a scrolling effect to
(1(1 Vote))
'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
It animates text in the title bar of form.Also in this program we have given a scrolling effect to Comments
No comments yet — be the first to post one!
Post a Comment