Non-desirable auto-scrolling to the beginning of the form

1.7k Views Asked by At

I have a Form which contains one control: Panel, which is much bigger than form itself. So, the form's scrollbar is used to navigate this panel. Autoscroll property of the form is set to true. The problem is: after showing any dialog window the AutoscrollPosition is set to begining. How I can override this behavior to save scroll position.

1

There are 1 best solutions below

4
On BEST ANSWER

You can override this by manually setting the scroll pos in your code. Just use Activated and Deactivated events of the form.

Look here for the answer to same problem and the Code

https://stackoverflow.com/questions/2020938/why-does-scrolling-position-change-after-refocusing-the-form/2022561#2022561