How can we position the auto scroll of a winform at the top? Currently it is 开发者_StackOverflow社区automatically scrolling to bottom of the form.
this.AutoScrollPosition = new Point(0,0);
Where 'this' is the form.
Set Focus to a control at the top. Winforms scrolls to the control that has focus
In my case I wanted to scroll to a certain control and in the Form that contains mycontrol I did:
mycontrol.Focus();
wich scrolls to the Control
If your form has a panel controls click "View" -> "Tab Order" and click the panel first. The tab's Tab Order will change to 0. This will automatically focus the first panel in the form.
精彩评论