Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5996233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:04:27+00:00 2026-05-23T00:04:27+00:00

I want to implement a fancy scroll bar for a multiline textbox like the

  • 0

I want to implement a fancy scroll bar for a multiline textbox like the picture below:

Standard scroll bar and fancy scroll bar

Any ideas for that fancy scroll bar?

P/S: I want vb.net solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:04:28+00:00Added an answer on May 23, 2026 at 12:04 am

    If the fancy scroll bar can be implemented as another control (your image actually looks like that), here is the code of a ListBox that supports custom scrolling:

    Imports System.Runtime.InteropServices
    
    Public Class CustomScrollListBox
        Inherits ListBox
    
        Public Sub Scroll(ByVal percentage As Single)
            If (percentage < 0.0!) Then
                Throw New ArgumentException(Nothing, "percentage")
            End If
    
            ' Sends the scroll / set position Windows message
            Const WM_VSCROLL As Integer = &H115
            Const SB_THUMBPOSITION As Integer = 4
            Dim wp As Integer = CInt(((percentage * MyBase.Items.Count) * 65536.0!)) + SB_THUMBPOSITION
            CustomScrollListBox.SendMessage(MyBase.Handle, WM_VSCROLL, New IntPtr(wp), IntPtr.Zero)
        End Sub
    
        <DllImport("user32.dll")> _
        Private Shared Function SendMessage(ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
        End Function
    
        Protected Overrides ReadOnly Property CreateParams() As CreateParams
            Get
                ' Removes the vertical scroll window style
                Dim p As CreateParams = MyBase.CreateParams
                Const WS_VSCROLL As Integer = &H200000
                p.Style = (p.Style And -WS_VSCROLL)
                Return p
            End Get
        End Property
    
    End Class
    

    And here is a sample form that uses it. I have implemented the custom scroller as a standard Trackbar (trackBar1) for the example:

    Public Class Form1
    
        Private trackBar As TrackBar
        Private listBox As CustomScrollListBox
    
        Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
            ' initialize some listbox props
            listBox = New CustomScrollListBox
            listBox.Location = New Point(&H19, 210)
            listBox.Name = "listBox2"
            listBox.Size = New Size((&H17D - Me.TrackBar1.Width), &HAD)
            listBox.TabIndex = 1
            MyBase.Controls.Add(listBox)
    
           ' add some items
            Dim i As Integer
            For i = 0 To 100 - 1
                listBox.Items.Add(("item" & i))
            Next i
    
        End Sub
    
    
        Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
            ' compute trackbar's position as a percentage
            listBox.Scroll(CSng(TrackBar1.Maximum - TrackBar1.Value) / TrackBar1.Maximum - TrackBar1.Minimum)
        End Sub
    
    End Class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I Want Implement a Software by C#.net.I want Use a DataBase Manager Software like
I want implement in my software solution an VBA editor but in c# 3.0.
Microsoft has announce that WindowsLiveID become a OpenID provider . I want implement it
I want to implement an ISAPI filter like feature using HttpModule in IIS7 running
I want implement paging same as safari in iphone.When user touch below button of
I am trying to implement a fancybox. http://fancybox.net/howto I want to call this function
I want implement a program that can do a a Vision-based Page Segmentation. I
I want to implement support of the XMLRPC protocol for my server that is
I want to implement a REST-api in C#. I found that WCF Webapi can
I want to implement pagination in Play FrameWork , Is there any tutorial or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.