I have a .Net Panel control that contains a single child control that is a WebBrowser. I won't go into the reasons for me doing that, but it is related to printing out the control. The panel control has its AutoScroll property set to "true" and I am sizing the WebBrowser to fit its own content (by using the .Document.Body.ScrollRectangle.Size property of the WebBrowser when the NavigateComplete2 event fires). In this way, the scrollbar on the panel appears and you can scroll the panel up and down in order to be able to see the content of the WebBrowser.
The problem is that when you scroll down to see what's at the bottom of the WebBrowser and then click on it (perhaps you click on a link in the html), the panel jumps back to the top and the link doesn't get actioned.
Please can anyone help me to understand what's going on and how to get around this problem?