|
-
Jun 4th, 2002, 11:37 PM
#1
Thread Starter
Addicted Member
lablels
Do any bady remember a thread which gave code to rotate text in a label.I forgot that id if any body can get me that I would be vary greatfull. I searched a lot but that didnt come up
-
Jun 4th, 2002, 11:51 PM
#2
Hyperactive Member
Not sure if you want to reverse or create a mirror image,
but here's how you reverse a label's caption:
Code:
Private Sub Command1_Click()
Label1.Caption = ReverseCaption(Label1.Caption)
End Sub
Public Function ReverseCaption(revCaption As String) As String
Dim iRev As Integer
For iRev = Len(revCaption) To 1 Step -1
ReverseCaption = ReverseCaption & Mid(revCaption, iRev, 1)
Next iRev
End Function
Sometimes what you're looking for is exactly where you left it.
-
Jun 5th, 2002, 12:03 AM
#3
Thread Starter
Addicted Member
No what I require is that the same efect of marquee in html. I will do that in a timer
-
Jun 5th, 2002, 12:19 AM
#4
The picture isn't missing
Originally posted by JohnVB6
Not sure if you want to reverse or create a mirror image,
but here's how you reverse a label's caption:
Code:
Private Sub Command1_Click()
Label1.Caption = ReverseCaption(Label1.Caption)
End Sub
Public Function ReverseCaption(revCaption As String) As String
Dim iRev As Integer
For iRev = Len(revCaption) To 1 Step -1
ReverseCaption = ReverseCaption & Mid(revCaption, iRev, 1)
Next iRev
End Function
for VB6, all you need is StrReverse("String to go backwards")
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Jun 5th, 2002, 12:21 AM
#5
Hyperactive Member
Sometimes what you're looking for is exactly where you left it.
-
Jun 5th, 2002, 12:29 AM
#6
Thread Starter
Addicted Member
-
Jun 5th, 2002, 01:08 AM
#7
Hyperactive Member
I mean oops, how did I forget that.
Sometimes what you're looking for is exactly where you left it.
-
Jun 5th, 2002, 01:13 AM
#8
^:^...ANGEL...^:^
Try this...
Private V As Long
Private W As String
Private X As String
Private Y As Long
Private Z As Long
Private Sub CheckAgain()
W = Label1.Caption
Z = Len(W)
Y = 0
End Sub
Private Sub Form_Load()
Label1.Caption = "This is test..."
On Error GoTo ErrorHandlerNo
V = 0
CheckAgain
On Error GoTo 0
Form_Load:
Exit Sub
End If
ErrorHandlerNo:
If Err.Number = 364 Then
End
End If
End Sub
Private Sub Timer1_Timer()
X = Left(W, Y)
Label1.Caption = X
V = V + 1
If V < 45 Then ' V < 45 where 45 is the length of caption
Y = Y + 1
If Y > Z Then Y = 0
End If
End Sub
-
Jun 5th, 2002, 01:22 AM
#9
-
Jun 5th, 2002, 02:13 PM
#10
Hyperactive Member
Sometimes what you're looking for is exactly where you left it.
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
|