by Sam Witney (7 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 21st December 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Want to make a scrolling title, status bar or label like a scrolling marquee? - With this you can! Simple, fully documented code, easly gives
API Declarations
Dim position, startpos
Private Sub Timer1_Timer()
position = position + 1
'the line text - change as needed, or replace with variables.
linetxt$ = "||| Scrolling text |||" & " Your Message here" & " " & Time & " " & Date & ""
'this finds the lengh of the line
startpos = Len(linetxt$)
'now using the lengh, removes the first charictor from the line, making it scroll
lengh = startpos - position
'if the line is now blank, then start again with the full line
If lengh = 0 Then
position = 0 - startpos
End If
'The text$ now becomes the scrolling line, which then becomes the caption of the form.
Text$ = Right(linetxt$, lengh)
Me.Caption = Text$
'replace me.caption with the label, box, status bar ect you want to show the scrolling effect
End Sub
No comments have been posted about Want to make a scrolling title, status bar or label like a scrolling marquee? - With this you can! . Why not be the first to post a comment about Want to make a scrolling title, status bar or label like a scrolling marquee? - With this you can! .