Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21271

Need Help animated marquee text in a label not moving

$
0
0
hi i think something wrong in the code i got this in one of the suggestion here and i tried... i dont really have any knowledge in making a animated marquee text when i test this code and run this, the text in the label is not moving going to left.... i need this to be part of my announcement in my number system project...
here is the code

Code:

Option Explicit

Private Sub Form_Load()
    lblannounce.Caption = "Hello World. I am a not moving. help."
    lblannounce.Alignment = vbRightJustify
    Me.Font = lblannounce.Font
    lblannounce.Width = Me.TextWidth(lblannounce.Caption) + 30
    Timer1.Interval = 100
End Sub

Private Sub Timer1_Timer()
Static i As Integer
    i = i + 1
    If i = Len(lblannounce.Caption) + 1 Then
        i = 1
            lblannounce.Caption = VBA.Left$(lblannounce.Caption, i)
    End If
End Sub

than for the help...

Viewing all articles
Browse latest Browse all 21271

Trending Articles