Click here to Skip to main content
13,145,568 members (46,949 online)
Click here to Skip to main content
Add your own
alternative version


27 bookmarked
Posted 26 Oct 2006

Skinning a vertical scrollbar

, 26 Oct 2006
Rate this:
Please Sign up or sign in to vote.
An article on how to skin a scrollbar in a textbox or listbox with VB.NET.

Sample Image - skinScrolling.gif


This code tries to do the same other good programmers (flyhigh, zoetrope) already have done, but with a special flavour, using VB.NET and adding two ways to get it:

  • a hand skinning method
  • a custom control in the VS palette

But remember, I say 'tries' because the code is in alpha stage.

This is only a remixing project from other sources (thanks to all CodeProject coders from whom I still steel code for fun)...


I was looking for an easy skinning, free, managed solution, not C++, nor closed DLL, but the scrollbars seemed not so easy to achieve.

I recommend reading two articles: one from flyhigh posted on 6 of July 2006, and another from zoetrope about motif scrollbars.

Using the code

If you are planning to reuse or to unskin the listboxes or textboxes on the fly, then you can handwrite the code to skin your already created and positioned controls. Include a new variable of type scrollSkin, and in the New() function of the main form, associate this ListBox with the constructor. Don't forget to add it to the Me form.

Friend WithEvents noDesignerCtl  As IPEuropa.scrollSkin

Sub New()

    ' This call is required by the Windows Form Designer.

    'UserControls manual skinning  
    Me.noDesignerCtl  = New IPEuropa.scrollSkin(Me.ListBox1)

    Me.noDesignerCtl .TabIndex = 0


End Sub

If you prefer to drag and drop from the control's palette a customScroll for each ListBox or TextBox, this customScroll is a Panel, so you have to put into it a TextBox or a ListBox control, docked in Fill mode and resize it to fit the vertical scrollbar.


  • Very first version: 15 October, 2006.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Web Developer
Spain Spain
Born in Valencia (Spain). Agricultural engineer, informatics engineer.
Keen on drinking wine & beer and travelling.(original isn't it)
Actually teaching in high-school an wasting a significative part of my life in programming with the .NET.

You may also be interested in...

Comments and Discussions

QuestionShow the slider when a image is clicked. Pin
Raha2823-Jun-12 23:20
memberRaha2823-Jun-12 23:20 
GeneralMy vote of 5 Pin
manoj kumar choubey24-Feb-12 2:09
membermanoj kumar choubey24-Feb-12 2:09 
GeneralMy vote of 5 Pin
sriramCodeProject27-Jun-11 19:34
membersriramCodeProject27-Jun-11 19:34 
QuestionCan you Convert it to VB.Net 2003? Pin
dyh22221-Nov-06 3:46
memberdyh22221-Nov-06 3:46 
AnswerRe: Can you Convert it to VB.Net 2003? Pin
MartinSon8-Nov-06 7:46
memberMartinSon8-Nov-06 7:46 
GeneralCan you Convert it to delphi Pin
sail20003-Jan-07 7:58
membersail20003-Jan-07 7:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 26 Oct 2006
Article Copyright 2006 by MartinSon
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid