public virtual void MouseMove(Control c, Point pt)
{
if (_captured)
{
// Ignore multiple calls with the same point
if ((_lastMovePt == null) || (_lastMovePt != pt))
{
_lastMovePt = pt;
// Find the new target value given mouse position
int newTargetValue = _drawTB.NearestValueFromPoint(pt);
// If this is a change in value then update now
if (_drawTB.ViewDrawTrackBar.Value != newTargetValue)
_drawTB.ViewDrawTrackBar.ScrollValue = Math.Max(_drawTB.ViewDrawTrackBar.Minimum, Math.Min(newTargetValue, _drawTB.ViewDrawTrackBar.Maximum));
}
}
}