VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Smooth Scrolling"
   ClientHeight    =   4260
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   7065
   LinkTopic       =   "Form1"
   ScaleHeight     =   4260
   ScaleWidth      =   7065
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   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          =   1575
      Left            =   3000
      ScaleHeight     =   1545
      ScaleWidth      =   6225
      TabIndex        =   1
      Top             =   4680
      Width           =   6255
   End
   Begin VB.Timer Timer1 
      Interval        =   5
      Left            =   6360
      Top             =   600
   End
   Begin VB.PictureBox Picture1 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   1575
      Left            =   3000
      ScaleHeight     =   1545
      ScaleWidth      =   6225
      TabIndex        =   0
      Top             =   2760
      Width           =   6255
      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            =   960
         TabIndex        =   2
         Top             =   480
         Width           =   11700
      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

Private Sub Timer1_Timer()
    Label1.Move Label1.Left - 10 ' move the label to the left for scrolling effect
    If Label1.Left < -Label1.Width Then Label1.Left = Picture1.Width
    Me.Picture1.CurrentY = Me.Label1.Top ' use the label coordinates to set printing position
    Me.Picture1.CurrentX = Me.Label1.Left ' use the label coordinates to set the printing position
    'Me.Picture1.Print Me.Label1 ' 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
