If you have a control (e.g. TextBox ) that is much wider than the container, and you scroll to the end, then click on the control, you will scroll back to the Location control.
The selected control gains focus, and scrolling occurs automatically, this is the standard behavior of winforms.
If you want to undo this, you will need to intercept the SetAutoScrollPosition container ( ScrollableControl ) or use another mechanism to return to its original position.
If the control already has focus and then scrolls, pressing it again does not change the container's AutoScrollPosition .
source share