By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,239 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,239 IT Pros & Developers. It's quick & easy.

Scrolling a form to a particular point...

P: n/a
I have a long VB.NET form with a scrollbar (autoscroll=true, not an actual
scrollbar control).
In response to one particular buttonclick, I need to scroll down to a
particular point on the form, and I can't figure out how to do it! Nothing I
try seems to work.

Just in case it matters, it is a maximized child window of an MDI parent
application.

Thanks for your help!
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
* "BradC" <br********@yahoo.com> scripsit:
I have a long VB.NET form with a scrollbar (autoscroll=true, not an actual
scrollbar control).
In response to one particular buttonclick, I need to scroll down to a
particular point on the form, and I can't figure out how to do it! Nothing I
try seems to work.


Set the form's 'AutoScrollPosition' property.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

P: n/a
Thanks. That does move it, but it doesn't seem to move it to the right
place.

Let me give an example:
My form totals about 1000 pixels tall.
I have a panel starting about y=500 that I want to appear at the TOP of the
window.
(So I want to see from 500 to however tall their window size is).

If I try to set .AutoScrollPosition = New Point(0, 500),
it scoots down just a tiny bit so your viewing from, say, 100 to 600.
If I click the same button again, THEN it scoots down further so you can see
the entire panel.

Is my syntax correct?
Thanks
BradC

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:bu************@ID-208219.news.uni-berlin.de...
* "BradC" <br********@yahoo.com> scripsit:
I have a long VB.NET form with a scrollbar (autoscroll=true, not an actual scrollbar control).
In response to one particular buttonclick, I need to scroll down to a
particular point on the form, and I can't figure out how to do it! Nothing I try seems to work.


Set the form's 'AutoScrollPosition' property.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.