I understand the inherit and the override the paint method but be new
to vb.net I am not sure what you mean by call it base
Ok... no problem... let me explain...
So you have the default scrollbar, and you are going to create a new class
that inherits from scrollbar... say call it scrollbarfoo.
ex. Public Class ScrollBarFoo Inherits ScrollBar
Now... if you create an instance of scrollbarfoo, it is going to look like
a normal scrollbar, since you haven't changed anything from the original
scrollbar. But we want some text to appear on it, so we want to override
(replace) the method that 'draws' the scrollbar on the form.
This method is really split into two, there is the onpaintbackground
method and the onpaint event.
So.. create a method that overrides the original onpaint method that
you're inheriting. Since you don't want to go through the hassle of
re-drawing the entire scrollbar (and you don't want to believe me), the
first thing you're going to do is to call the original onpaint method (the
one you're replacing)... this will draw the usual scrollbar for you, now
all you need to do is continue to add any other graphics that you want..
in your case, you want to use the Graphics.DrawString method.
The command you want to use to call the base class is MyBase