Make your own free website on Tripod.com

Make Scrolling Credits

'Add 1 Timer Control and 1 Picture Box To Your Form.
'Set the Timer Interval property to 5. You can increase\decrease ths number to
'slow down\accelerate the scrolling text.
'Insert another Picture Box into the First Picture Box, And Insert A Label into the second
'Picture Box. You will get A Label inside a Picture Box, Inside Another Picture Box.
'Click on the form to stop and scroll again the text.
'Insert the following code to your form:

Private Sub Form_Load()
Picture1.ScaleMode = 3
Picture1.BorderStyle = 0
Picture1.Width = Me.ScaleWidth
Picture1.Height = Me.ScaleHeight
Picture1.Left = 0
Picture1.Top = 0
Picture2.BorderStyle = 0
Picture2.Top = Picture1.ScaleHeight
Label1.WordWrap = True
Label1.Left = 0
Label1.Width = Picture2.ScaleWidth
Label1.FontSize = 12
'Enter here your scrolling text. You can add Images and another Labels to Picture2. they
'will scroll too
.
Label1.Caption = "This is Example of scrolling credits. Visit our site at Go.to\VBHelp"
Label1.AutoSize = True
Label1.Top = 0
Picture2.Height = Label1.Height \ Screen.TwipsPerPixelY + 10
Picture2.Left = (Picture1.Width \ Screen.TwipsPerPixelX - Picture2.Width) / 2
End Sub

Private Sub Label1_Click()
Timer1.Enabled = Not Timer1.Enabled
End Sub

Private Sub Picture1_Click()
Timer1.Enabled = Not Timer1.Enabled
End Sub

Private Sub Timer1_Timer()
Picture2.Top = Picture2.Top - 1
If Picture2.Top <= -Picture2.Height Then Picture2.Top = Picture1.ScaleHeight
End Sub

Go Back