public void HandleMouseWheel(MouseEventArgs e)
{
int scrollDistance = mouseWheelHandler.GetScrollAmount(e);
if (scrollDistance == 0)
return;
if (control.TextEditorProperties.MouseWheelScrollDown)
scrollDistance = -scrollDistance;
int newValue = vScrollBar.Value + vScrollBar.SmallChange * scrollDistance;
vScrollBar.Value = Math.Max(vScrollBar.Minimum, Math.Min(vScrollBar.Maximum - vScrollBar.LargeChange + 1, newValue));
}