|
-
Jan 31st, 2002, 08:57 PM
#1
Thread Starter
Junior Member
A-X (Add own property)
I am creating a scroller (sorta like a ticker) out of a labe and a timer, and I want to create a new text property. I want what you enter in text property to be the text that is scrolled. I created this in a form and I used a variable, but I want the text to be scrolled to come from the text property.
Here was my original code: (all you need is a timer, and a label)
Private Sub Timer1_Timer()
Dim Text As String, Scr As Integer, Scrl As Integer
Text = "Oldies But Goodies!!"
Scr = Scr + 1
If Scr = 20 Then Scr = 19: GoTo Scroll2
Scrl = 0
lblScroll.Alignment = vbRightJustify
lblScroll.Caption = Mid(Text, 1, Scr)
Exit Sub
Scroll2:
lblScroll.Alignment = vbLeftJustify
Scrl = Scrl + 1
If Scrl = 20 Then Scr = 0
lblScroll.Caption = Right(Text, Len(Text) - Scrl)
End Sub
---------------------------------
If You understand any of this, I would appreciate your help.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|