-
Please help!
PLEASE HELP!!
I am trying to scroll text (totalling about 3,000 words in length) across the screen. So far I have failed and have achieved absolutely nothing!
Is it best using a picturebox or should i use a label.
I hope someone can help out there.
Thanks very much it is much appreciated.
Dave.:confused:
-
Picturebox vs. label.
It depends on which effect you are searching for, if it's the smooth effect, I would go for the picturebox. If you wan't the effect where the text shifts one character at the time, the label will properly do.
I could take a look on it, but you would need to send some code, so I can see what you are doing.
-
i'm looking for a smooth effect.
like the electronic notice boards you see when text continously scrolls from right to left. Or another example is on Bloomberg T.V where the shares prices again scroll from right to left.
;)
-
<?>
Code:
'Your string must fit the caption of the label so it will only
'allow you a certain size and not 3000...least I couldn't get it to run
'An exhibit of scrolling text
'need 1 label, 1 timer, 1 command button for this example
'
Option Explicit
Private Sub Command1_Click()
'will give user a Yes or No prompt in which they wish to exit
Dim x As Integer
x = MsgBox("Are you sure you want to exit?", vbYesNo, "Exit")
If x = 6 Then
End
End If
End Sub
Private Sub Form_Load()
Dim msg As String
msg = "Here is a simple example of scrolling a line of text across the screen "
Label1.Visible = True
Label1.Enabled = True
'position of labels
Form1.Enabled = True
Label1.Caption = msg
Label1.Left = -4999
Label1.Top = 0
Label1.Height = 255
Form1.Width = Screen.Width - 200
Label1.AutoSize = True
Form1.Height = 2600
Command1.Top = 1320
Command1.Left = 0
Command1.Height = 375
Command1.Width = 6705
Command1.Caption = "Exit Example"
Command1.Enabled = True
Command1.Visible = True
Timer1.Enabled = True
Timer1.Interval = 1
End Sub
Private Sub Timer1_Timer()
If Label1.Left < -5000 Then
Label1.Left = Screen.Width - 200
Else
Label1.Left = Val(Label1.Left) - 40
End If
End Sub
-
1 Attachment(s)
I have created a small example, that you can work out from. It shows you one way of creating scrollable text (there are many).
I have included the two files needed.