Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
How to make scrolling credits in VB

 
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum
Author Message
dude
Power User
Power User


Joined: 10 Mar 2004
Posts: 376
Location: Savar, Dhaka

Post Post subject: How to make scrolling credits in VB Reply with quote

I just learned a kool trick to do in Visual Basic. I think, many of us have seen it and it looks very good to have a scrolling form that shows the credit information for the VB application. Try it out.

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
Wed Jun 23, 04 8:54 am
Back to top
dude View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Programming in Java, C, C#, VB, .NET Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group