by Jothi Manikandan (1 Submission)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 30th November 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Elegant Title Scroller Simple code
i = 0
End Sub
Public Sub Scroll(msg As String)
Dim t, ln As Variant
Static i, s As Integer
i = i + 1
Dim mess As String
mess = msg
ln = Len(mess)
If i + ln < 160 Then
t = Space(160 - i) & Mid(mess, 1, i)
Else
If Len(t) = 1 Or s > ln Then
i = 0
s = 0
Else
If i < 160 Then
t = Space(160 - i) & mess
Else
t = Right(mess, ln - s)
s = s + 1
End If
End If
End If
Me.Caption = t
End Sub
Private Sub timer1_Timer()
Call Scroll(OraAdmin.Tag)
End Sub