VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

A easy Scroll with 1 line of code

Steve Williams  (1 Submission)   Miscellaneous   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

Scroll a label with just one line of code...great for showing credits!!!!

Inputs
You will need a timer and set the interval to 1 and of course a label with whatever you want to say. In this example position the label toward the bottom of the form

Assumes
Put this in your timer event Bottom to Top Scroll 1) Use the move method; label1.Move 2) Keep the labels Left property the same; label1.move label1.left 3) Move it by subtracting from the top label1.Move label1.Left, label1.Top - 10 Thats it...It don't get any easier than this! For a faster scroll just subtract more from the top; ie: label1.Move label1.Left, label1.Top - 50 Side Scroll "Marquee" label1.Move label1.Left - 10 The Top is optional as well as the Width and Height

Side Effects
It will give the same amount of flicker as the others do but why write all that code to do the same purpose?

Rate A easy Scroll with 1 line of code (4(4 Vote))
A easy Scroll with 1 line of code.bas

A easy Scroll with 1 line of code Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters