Does anyone know whether it is possible to programmatically determine the dimensions of the thumb of a System.Windows.Forms.TrackBar. (By thumb I mean the bit you drag around!)
I know you can get things like scrollbar widths from the System.Windows.Forms.SystemInfo class but there doesn’t seem to be anything for trackbars.
Thanks.
The thumb size can be obtained by sending the TBM_GETTHUMBRECT message to the
TrackBarcontrol. There is no way to do that directly from C#, but you can define the appropriate Win32 structures and p/invokeSendMessage():