[VB.Net Tutorial] Smooth scrolling text (Easy!) menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    Electricrain's Avatar Member
    Reputation
    8
    Join Date
    Aug 2009
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [VB.Net Tutorial] Smooth scrolling text (Easy!)

    Hello boys and girls! :wave:

    This is my first vb.net tutorial. I plan on making a series, covering things such as SMTP-handling, FTP, webRequests, proxys, obfuscation, and general tips & tricks.


    This tutorial will show you how to make a vertical scrolling text. You will be able to easily change the scrolling speed, area of scrolling and so forth.
    This is great for things like credits, news-tickers or just making things look damn cool.


    To begin, add the following components to your Form1.
    (Component, Name of component)
    1 picturebox, PicHolder
    1 timer, tmrScroll
    1 label, lblMsg


    Layout
    First, place PicHolder on your form. Choose "Dock in parent container", or make it any size you like. The size of the picturebox does not change the way we will code the scrolling!

    Secondly, place lblMsg inside PicHolder. In the properties of lblMsg, choose textalign=middle. Then write "Hello world" and align it in the middle of PicHolder
    (middle of PicHolder = PicHolder.width/4).

    Code
    Doubleclick on the menubar of Form1 to go into the code editor and the sub Form1_Load, then we write the following code:
    Code:
     tmrScroll.Interval = 20
    Tmrscroll.Enabled = True
    lblMsg.Top = PicHolder.Height
    The interval of TmrScroll will determine how fast the text scrolls. Play around with it to find a value you like (usually between 10-30). After the timer-settings, we set the top of lblMsg to the height of PicHolder. You will understand this in the next step.
    Doubleclick on tmrScroll to go into the sub tmrScroll_Tick and write this:
    Code:
    If lblMsg.Top > -lblMsg.Height Then
                lblMsg.Top = lblMsg.Top - 1
            Else
                lblMsg.Top = PicHolder.Height
            End If
    As you can see, it performs a check on where the lblMsg's position is relative to the height of PicHolder, and performs a slight change of the values which results in the smooth movement of the text within PicHolder.

    And we are all done! Remember, you change the speed of the text by changing the Interval of tmrScroll in the Form1 loadevent. To make sure you understand this tutorial, make the text scroll horizontally!

    [VB.Net Tutorial] Smooth scrolling text (Easy!)
  2. #2
    Cush's Avatar Elite User
    Reputation
    504
    Join Date
    May 2006
    Posts
    528
    Thanks G/R
    3/19
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not totally interested in this, but the other things you mentioned I am :P

    Way to contribute, anyway.

Similar Threads

  1. [Tutorial] SheEpYW0lf's Text Tutorial for Signatures
    By Erase in forum Art & Graphic Design
    Replies: 10
    Last Post: 02-02-2010, 12:16 AM
  2. Replies: 6
    Last Post: 08-04-2009, 11:08 AM
  3. [Tutorial] WarCraft'ish Text
    By sheepking in forum Art & Graphic Design
    Replies: 0
    Last Post: 09-12-2008, 05:33 PM
  4. [Tutorial] 3D looking text
    By RyudoP in forum Art & Graphic Design
    Replies: 11
    Last Post: 02-17-2008, 09:09 AM
  5. Tutorial: Shocking Text (Easy)
    By Xarv in forum Art & Graphic Design
    Replies: 24
    Last Post: 11-15-2007, 01:12 PM
All times are GMT -5. The time now is 11:00 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search