How can i have the text on my prog scrool across the form. like a marquee.
Printable View
How can i have the text on my prog scrool across the form. like a marquee.
Set the CurrentX and CurrentY on the form to position next output and use Print method on the form to print the text on it. Declare a decrementing counter variable which you use in a timer and change CurrentX accordingly before you print.
VB Code:
Option Explicit Dim XVal Dim Phrase as String Private Sub Form_Load() Me.ScaleMode = vbPixels Label1.Autosize = True Label1.Caption = Phrase Label1.Visible = False End Sub Private Sub Timer1_Timer() XVal = XVal + 1 If XVal > Me.ScaleWidth + Label1.Width * 2 Then XVal = 0 Me.CurrentX = Xval - Label1.Width Me.Print Phrase End Sub