Question about WinForms TrackBar control in .Net
Question
Does anyone know the millisecond interval, used by the framework trackbar, between calling the ValueChanged event when moving the grip with a mouse?
I've implemented my own trackbar and I'd like the behaviour to be consistent with what the user expects.
I've had a look in reflector but it's one of those controls where most of the implementation is not viewable.
ETA: Actually, thinking about it, it's not as simple as that. For small changes, the TrackBar is raising the event for every change. However, if you make a large fast change with the grip, it will not raise the event for every step. Just wondering exactly how the framework does this?
Thanks
Solution
The TrackBar control is a wrapper around the native Windows Trackbar control. You won't find any relevant code.
This is almost certainly controlled by WM_MOUSEMOVE messages, if you move the mouse fast, it skips reporting back some intermediate positions. Your custom control should therefore act exactly like TrackBar.