Does anyone have a good chunk of code that will scroll text horizontally from right to left. The string will be over 300 chars. Thanks for the help
Scrolling Text
Started by Brettpach, Apr 24 2007 10:36 AM
6 replies to this topic
#1
Posted 24 April 2007 - 10:36 AM
|
|
|
#2
Guest_Jordan_*
Posted 24 April 2007 - 11:42 AM
Guest_Jordan_*
What are you trying to scroll it in? (Textbox, Label, etc)
Here is a control for Visual Basic that does it: Overview - Scrolling Text Control - Developer Fusion: Connecting Developers Worldwide. C#, .NET, VB, Java, PHP and XML tutorials & source code
Here is a control for Visual Basic that does it: Overview - Scrolling Text Control - Developer Fusion: Connecting Developers Worldwide. C#, .NET, VB, Java, PHP and XML tutorials & source code
#3
Posted 24 April 2007 - 12:33 PM
I am looking to use this a part of a dashboard application that will scroll kinda like a news ticker. The site above looks like a web control. that wont work for what im doin.
#4
Guest_NeedHelp_*
Posted 26 April 2007 - 06:28 AM
Guest_NeedHelp_*
Couldn't you create a label with the form background color and the preferred text in it. Then move the position of the label in a never ending loop? Probably not what you are looking for but I believe it would work!
#5
Posted 26 April 2007 - 04:34 PM
Labels have a capped number of characters so this idea wouldn't work. I had one going but after 195 characters it failed I was just looking for an open source chunk of code that was already developed. I'm sure I can get this to work with time but I'm just trying to maximize efficiency, no sense reinventing the wheel. Again thank you for any help.
#6
Guest_Jordan_*
Posted 27 April 2007 - 05:42 AM
Guest_Jordan_*
Here is one for .NET which may be what you are looking for:
Visual Basic.NET (VB.NET) Source Code: How to Show Scrolling Text in a Windows Forms Application - VB
Visual Basic.NET (VB.NET) Source Code: How to Show Scrolling Text in a Windows Forms Application - VB
#7
Posted 10 May 2007 - 04:05 AM
Well I think I can help you, and there should be no problems with the Label, if your string is 300 characters then make 2 labels (if one label holds 195 characters as you said) then just get the X axis of the label and always make it - 100 or something
Here is the Code for you, btw you can always use a Text box instead of a label :)
Make a timer with interval 500 (or value you want)
Then you can elaborate more so as to bring it back from the other side and to continue scrolling (it's simple, but it's your project right?)
Here is the Code for you, btw you can always use a Text box instead of a label :)
Make a timer with interval 500 (or value you want)
Private Sub Timer1_Timer() Label1.Left = Label1.Left - 100 Label2.Left = Label2.Left - 100 End Sub
Then you can elaborate more so as to bring it back from the other side and to continue scrolling (it's simple, but it's your project right?)


Sign In
Create Account

Back to top









