I left my msdn cd at home at cant use the help today :~(
does anyone know if there is a marquee box control for vb?
Marquee box as being, like a text box, but scrolls the text, say from right to left across.
Printable View
I left my msdn cd at home at cant use the help today :~(
does anyone know if there is a marquee box control for vb?
Marquee box as being, like a text box, but scrolls the text, say from right to left across.
I don't mean to laugh, but the latest MSDN stuff is all on line.
http://msdn.microsoft.com/library/default.asp
Sorry I can't help with your specific question, but at least you now have access to the resource...
This code uses a timer to scroll text in a text box (or you can use a label, a form caption, or whatever you want that displays text).
Strech a text box across a form, drop a timer on the form, keep the default control names, and paste the following into the form's code window:
Code:Option Explicit
Private sMsg As String 'Holds the scrolling message text
Private nStartPos As Integer 'Counter
Const TEXT_DISPLAY_LENGTH As Integer = 50 'Width of text to display
Private Sub Form_Load()
' Right-justfiy text box
Text1.Alignment = 1
' I think it's less jerky with a fixed character length font (not sure, though)
Text1.Font = "Courier New"
' Set timer interval
Timer1.Interval = 100
'I create a long message here. You can add whatever you want.
sMsg = "Hello, how are you today? "
sMsg = sMsg & "I am fine. "
sMsg = sMsg & "Nice weather we're having. "
sMsg = sMsg & "Did you catch the game last night? "
End Sub
Private Sub Timer1_Timer()
nStartPos = nStartPos + 1
If nStartPos > Len(sMsg) Then
nStartPos = 1
End If
Text1 = Right$(Text1 & Mid$(sMsg, nStartPos, 1), TEXT_DISPLAY_LENGTH)
End Sub