Label scrolling with scroll bar-VBForums
Results 1 to 6 of 6

Thread: Label scrolling with scroll bar

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    343

    Label scrolling with scroll bar

    First off this is UserControl will make it so you have a label and you are able to scroll through the text of the label. I made this because I couldn't find it anywhere.
    its my first UserControl so don't go so hard on me. I know some parts could most likely be done a lot better but its the only way I knew how to do it..
    Simple code to scroll:
    Code:
        Dim cMax As Integer
        Dim cValue As Integer
        Dim cHeight As Integer
        
        cHeight = lblMessage.Height
        VScroll.Max = cHeight
        cValue = VScroll.Value
        
        lblMessage.Top = cValue - (cValue * 2)
    Attached code is the source. I hope you all enjoy
    Attached Files Attached Files
    Last edited by bluehairman; Feb 28th, 2008 at 10:44 AM. Reason: Removed Compiled Code

  2. #2
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: Label scrolling with scroll bar

    Per this CodeBank policy for attachments, I have removed the compiled OCX file posted in your attachment.

    Please post source code only.

    Thanks.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    343

    Re: Label scrolling with scroll bar

    Ahh, ok sorry about that.
    I only skimmed over that topic... Thats my fault there.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2006
    Posts
    343

    Re: Label scrolling with scroll bar

    Updated version that is much better
    Credits: Jottum
    Attached Files Attached Files
    Last edited by bluehairman; Mar 22nd, 2008 at 02:21 PM.

  5. #5
    Addicted Member
    Join Date
    Jul 2007
    Posts
    146

    Re: Label scrolling with scroll bar

    Quote Originally Posted by bluehairman
    Updated version that is much better: [...]

    Credits for editing: Jottum
    Note for moderator:
    I didn't want to change bluehairman's code without consulting him, which I did through PM. I've asked him to attach the file and remove the download link.
    Jottum™
    XpVistaControls , (transparent) usercontrols for XP, Vista and 7 with W2K legacy support.

  6. #6
    New Member
    Join Date
    Mar 2008
    Location
    Aussie!
    Posts
    1

    Thumbs up Re: Label scrolling with scroll bar

    I wanted to put a thing like this in my IPT assignment so I could scroll down the EULA but couldn't figure out how to do it. This code's saved my life, thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.