VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Smooth Scrolling"
   ClientHeight    =   9480
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   18390
   LinkTopic       =   "Form1"
   ScaleHeight     =   9480
   ScaleWidth      =   18390
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   360
      TabIndex        =   3
      Text            =   "Text1"
      Top             =   240
      Width           =   1695
   End
   Begin VB.PictureBox Picture2 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   975
      Left            =   360
      ScaleHeight     =   945
      ScaleWidth      =   12705
      TabIndex        =   1
      Top             =   4680
      Width           =   12735
   End
   Begin VB.Timer Timer1 
      Interval        =   8
      Left            =   6360
      Top             =   600
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BeginProperty Font 
         Name            =   "Verdana"
         Size            =   26.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   975
      Left            =   360
      ScaleHeight     =   945
      ScaleWidth      =   12705
      TabIndex        =   0
      Top             =   2760
      Width           =   12735
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Make this text scroll without a flicker"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   27.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   675
         Left            =   -360
         TabIndex        =   5
         Top             =   120
         Width           =   11700
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Label2"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   27.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   675
         Left            =   11760
         TabIndex        =   4
         Top             =   120
         Width           =   2085
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "Make this text scroll without a flicker"
         BeginProperty Font 
            Name            =   "Verdana"
            Size            =   27.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   675
         Left            =   -3240
         TabIndex        =   2
         Top             =   480
         Width           =   195
      End
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Private Const SRCCOPY = &HCC0020

Dim blLabelONEIsVisible As Boolean
Dim blLabelTWOIsVisible As Boolean


Private Sub Form_Load()

blLabelONEIsVisible = True
blLabelTWOIsVisible = False

Label2.Visible = False
Label2.Caption = "label2 this is label two and im testing this"
Label3.Caption = "label3 this is label two and im testing this"

End Sub

Private Sub Timer1_Timer()
    'Label3.Move Label3.Left - 20 ' move the label to the left for scrolling effect
   
    Text1 = Label2.Left
'    If label3.Left < -label3.Width Then
'        label3.Left = Picture1.Width
'    End If
    
    
    
   If blLabelONEIsVisible = True Then
        Label3.Move Label3.Left - 20
        
            If Label3.Left < -(Label3.Width / 2) Then
                Text1 = Label2.Left
                Label2.Visible = True
                
                
                If blLabelTWOIsVisible = False Then
                    blLabelTWOIsVisible = True
                    Label2.Left = Picture1.Width - 400
                End If
                
                If Label3.Left < -Label3.Width Then
                    blLabelONEIsVisible = False
                End If
                
            End If
    
    End If
    
    
    If blLabelTWOIsVisible = True Then
        Label2.Move Label2.Left - 20
        
            If Label2.Left < -(Label2.Width / 2) Then
        
            
        
        
                If blLabelONEIsVisible = False Then
                    blLabelONEIsVisible = True
                    Label3.Left = Picture1.Width - 400
                End If
                
                If Label2.Left < -Label2.Width Then
                    blLabelTWOIsVisible = False
                End If
        
            End If
    
    End If
    
    
    
    
    
    'Me.Picture1.CurrentY = Me.Label3.Top ' use the label coordinates to set printing position
    'Me.Picture1.CurrentX = Me.Label3.Left ' use the label coordinates to set the printing position
    'Me.Picture1.Print Me.Label3 ' print the label text on to the picture box
    'Picture2.Cls ' clear the destination picbox
    BitBlt Picture2.hDC, 0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, Picture1.hDC, 0, 0, SRCCOPY ' bitblt picture1 to picture2 to remove flicker
    
    
End Sub

Private Sub Timer2_Timer()

End Sub
