Moving/Scrolling Labels

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
2 posts Page 1 of 1
Contributors
User avatar
3aaBrSbeel
Top Poster
Top Poster
Posts: 139
Joined: Fri Jun 01, 2012 9:34 am

Moving/Scrolling Labels
3aaBrSbeel
Hey,
I was bored so I thought I could make a new topic. This one is pretty easy. It's a code that makes your Label/Text to move from the side of the form to the other (Right to Left) like in theaters. hehaho;

Ok, Let's start!

You'll need this things. (Shown in the picture below.)
Req.png
After you set up the things above. You need to adjust your Label/text.
Move your label to the right side of the form. Make sure it's hidden from the form. (As shown below)
Right.png
Let's move on to coding.

Add this on Timer1_tick
Code: Select all
Label1.Left -= 5
        If Label1.Left <= -Width Then
            Label1.Left = Width
        End If
We are done! Try and debug. If the label/text reaches the form in the left, just wait for 1 second. It will come back again.

I hope this helps. :D
You do not have the required permissions to view the files attached to this post.
Code'n'Stuff Signature Of 3aaBrSbeel
®║▌│█│║▌║││█║▌║▌║▌
✔ Verified Official Code'n'Stuff account ᵀᴴᴱ ᴼᴿᴵᴳᴵᴻᴬᴸ
Image
User avatar
smashapps
Coding Guru
Coding Guru
Posts: 961
Joined: Tue Apr 05, 2011 8:41 am

Re: Moving/Scrolling Labels
smashapps
I've done this before with a panel to shift images like a level background for scrolling platformers. It's fun to play around with it and experiment.

Nice tutorial. You can use it to make flashing and colour changing labels too, just add the ForeColor in the timer event.
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
2 posts Page 1 of 1
Return to “Tutorials”