Dxt-Cobra
10-18-2007, 06:09 PM
scrolling text in vb6
by dxt-cobra
things you need:
1 label for our text
1 timer for text to scroll
'put this in the top of in the general section,
Dim lTwipsX As Long
Dim lTwipsY As Long
Dim intDeltaX As Integer
---------------------------------------------------------------------------
'put this in form load:
'make a label
notice mines label1
lTwipsX = Screen.TwipsPerPixelX
lTwipsY = Screen.TwipsPerPixelY
Label1.Left = Me.ScaleWidth '+ 60 '<<<<<<<<<<<<<< change label to your label here
intDeltaX = 35
--------------------------------------------------------
'make a timer
'set timer true and interval of 50
'put this in it
With Label1 '<<<<<<<<<<<<<< change label to your label here
.Left = .Left - intDeltaX
If .Left + .Width < Me.ScaleLeft Then
.Left = Me.ScaleWidth '+ 60
End If
End With
----------------------------------------------------------------------------------------------------
and thats it,turn it on and watch it scroll
by dxt-cobra
things you need:
1 label for our text
1 timer for text to scroll
'put this in the top of in the general section,
Dim lTwipsX As Long
Dim lTwipsY As Long
Dim intDeltaX As Integer
---------------------------------------------------------------------------
'put this in form load:
'make a label
notice mines label1
lTwipsX = Screen.TwipsPerPixelX
lTwipsY = Screen.TwipsPerPixelY
Label1.Left = Me.ScaleWidth '+ 60 '<<<<<<<<<<<<<< change label to your label here
intDeltaX = 35
--------------------------------------------------------
'make a timer
'set timer true and interval of 50
'put this in it
With Label1 '<<<<<<<<<<<<<< change label to your label here
.Left = .Left - intDeltaX
If .Left + .Width < Me.ScaleLeft Then
.Left = Me.ScaleWidth '+ 60
End If
End With
----------------------------------------------------------------------------------------------------
and thats it,turn it on and watch it scroll