void Scroll_MouseWheel(object sender, MouseEventArgs e)
{
if (isKeyCtrlPressed)
{
if (e.Delta > 0)
ZoomIn();
if (e.Delta < 0)
ZoomOut();
}
else
{
int newScrollValue = scroll.Value + scroll.LargeChange * e.Delta / SystemInformation.MouseWheelScrollLines / 120;
if (newScrollValue < scroll.Minimum)
newScrollValue = scroll.Minimum;
else if (newScrollValue > scroll.Maximum + 1 - scroll.LargeChange)
newScrollValue = scroll.Maximum + 1 - scroll.LargeChange;
scroll.Value = newScrollValue;
}
return;
}