VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code will help u to marquee a text within a label.

by Chirantan Bhattacharjee (6 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sat 4th November 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code will help u to marquee a text within a label.

Rate This code will help u to marquee a text within a label.



Private Sub Form_Load()
Me.Timer1.Enabled = False
str = Label1.Caption
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Label1.BackColor = vbBlack
Me.Label1.ForeColor = &HFF8080

Timer1.Enabled = False
Me.Label1.Caption = Trim(str)
Label1.Alignment = 2

End Sub

Private Sub label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Label1.BackColor = &HFF8080
Me.Label1.ForeColor = vbBlack
Me.Timer1.Enabled = True
Label1.Caption = Trim(Label1.Caption)
Label1.Alignment = 2
End Sub

Private Sub Timer1_Timer()
Label1.Caption = Label1.Caption + " "
If Len(Me.Label1.Caption) >= 56 Then
    Label1.Caption = Right(Label1.Caption, Len(Label1.Caption) - 1)
End If
If Left(Me.Label1.Caption, 1) = " " Then
    Label1.Alignment = 1
    Label1.Caption = str
End If
End Sub


'make sure all the controls are taken in the form.
'Please reply how you like our service
'Please reply to [email protected]


Download this snippet    Add to My Saved Code

This code will help u to marquee a text within a label. Comments

No comments have been posted about This code will help u to marquee a text within a label.. Why not be the first to post a comment about This code will help u to marquee a text within a label..

Post your comment

Subject:
Message:
0/1000 characters