How to make an ownerdraw Trackbar in WinForms
问题 I'm trying to make a trackbar with a custom graphic for the slider thumb. I have started out with the following code: namespace testapp { partial class MyTrackBar : System.Windows.Forms.TrackBar { public MyTrackBar() { InitializeComponent(); } protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) { // base.OnPaint(e); e.Graphics.FillRectangle(System.Drawing.Brushes.DarkSalmon, ClientRectangle); } } } But it never calls OnPaint. Anyone else come across this? I have used this