|
-
Oct 22nd, 2002, 06:18 AM
#1
Thread Starter
Frenzied Member
Scroll The Window Caption
Does anyone know how to scroll the caption of a window?
Beantown Boy
Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
-
Oct 22nd, 2002, 06:26 AM
#2
Do you mean like "Form1" in the window caption?
You want to scroll that across the window continously?
-
Oct 22nd, 2002, 11:28 AM
#3
Thread Starter
Frenzied Member
Yes sir, sir!
Beantown Boy
Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
-
Oct 22nd, 2002, 12:09 PM
#4
VB Code:
'to scroll right to left
Private Sub Timer1_Timer()
Me.Caption = " Scrolling Window Caption Form "
MyCaption = Me.Caption
If MyCaption = "" Then Exit Sub
For i = 0 To Len(MyCaption)
LastCaptionChar = Left(MyCaption, 1)
Me.Caption = Mid(MyCaption, 2) & LastCaptionChar
Next
End Sub
'to scroll left to right
Private Sub Timer2_Timer()
Me.Caption = " Scrolling Window Caption Form "
MyCaption = Me.Caption
If MyCaption = "" Then Exit Sub
For i = 0 To Len(MyCaption)
LastCaptionChar = Right(MyCaption, 1)
Me.Caption = LastCaptionChar & Left(MyCaption, Len(MyCaption) - 1)
Next
End Sub
'to change how the text scrolls at run time
Private Sub Command1_Click()
Timer1.Enabled = False
Timer2.Enabled = True
End Sub
'to scroll only if the form is minimized
Private Sub Form_Resize()
If Me.WindowState = vbMinimized Then
Timer1.Enabled = True
Else
Timer1.Enabled = False
Me.Caption = " Scrolling Window Caption Form "
End If
End Sub
-
Oct 22nd, 2002, 02:06 PM
#5
Thread Starter
Frenzied Member
Works great Hack, except that it only scrolls the length of the window caption text. Can I get it to scroll the entire length of the caption title bar regardless of the length of the text?
Beantown Boy
Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
-
Oct 22nd, 2002, 02:15 PM
#6
Lengthen the window caption with spaces.
-
Oct 23rd, 2002, 08:47 AM
#7
Thread Starter
Frenzied Member
Ok...
Beantown Boy
Please use [highlight=vb]your code goes in here[/highlight] tags when posting code.
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
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
|