Text Scroller With Pause

Text Scroller With Pause

To use the code you will need to create a new form. Make a picture box and name is "picHolder". Set the height of the pic box to 1335. Inside the pic box create a label named "lblMsg". I set the height to 855 and top to 240. Give the LbLMsg a caption, this is the text that will scroll. Next insert a timer named "Timer1" and another timer named "tmrScroll". Then enter the code. That should do it =)

Private Sub Form_Load()
   'Pause Feature by _ChAdWiCk_
   lblMsg.Top = picHolder.Height
   tmrScroll.Interval = 1
   tmrScroll.Enabled = True
End Sub
Private Sub tmrScroll_Timer()
   
   If lblMsg.Top > -lblMsg.Height Then
       lblMsg.Top = lblMsg.Top - 10
           If lblMsg.Top = 255 Then
           pause
           End If
   Else
       lblMsg.Top = picHolder.Height
   End If

End Sub

Sub pause()
tmrScroll.Enabled = False
Timer1.Interval = 3000
Timer1.Enabled = True
End Sub

Private Sub timer1_timer()
tmrScroll.Enabled = True
Timer1.Enabled = False
End Sub

You might also like...

Comments

 ChAdWiCk

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne