This will not be as easy as it might seem. One cannot simply augment the appearance of the TrackBar
control. You have to trigger UserPaint
by adding the following line to the constructor of a class that derives from TrackBar
:
SetStyle(ControlStyles.UserPaint, true);
This will, however, force you to own all of the painting. Meaning that you will then need to override both OnPaint
and OnPaintBackground
and use the methods in TrackBarRenderer
to paint the entire control.
Having said that, the methods given to you are pretty straightforward, and drawing the control is relatively easy.
Note: this Code Project article is bound to have lots of good pointers if you decide to pursue full-on custom drawing. Perhaps could even serve as your replacement control.
There are others. Just do a Google search for "C# TrackBar custom draw".