Scrolling large forms. Suggestions wanted

T

Tim Frawley

I have a large form with many controls, almost like legal size paper
in height.

Just so I can head these off, I am not looking for suggestions to the
effect of using Tab controls, multi-window or multi-page forms. The
Forms AutoScroll property is set to true so the user can scroll the
window.

What I would like to do is scroll the form for the user. I have
explored the possibility of Me.ScrollControlIntoView(control further
down the page). This works but is a little 'jumpy' on the user as the
form scrolls so fast the the window appears to jump to it's new scroll
point.

Are there any suggestions or ideas on how I could find the location on
the form the user is at, the direction they are going, Tab or
Shift-Tab order and incrementally scrolling (with the forms AutoScroll
option) to make the form appear less jumpy?

Thank you for any help you may provide...


Tim
 
G

Gary Chang [MSFT]

Hi Tim,

Thanks for posting in this group!

My suggestion is you can calculate the location the user at by query
Form.AutoScrollPosition Property.

To incrementally scrolling the form, you can put many invisible
controls(like Label) in form and make them vertically spacing closely and
equal, take these control as scrolling gauge, then when scrolling to some
specific position, firstly scrolling to the nearest invisible control
mention above, then using a timer to wait for little interval, then
scrolling to the next invisible control, and so on, ... finally scrolling
to the target position.

There are some information about the .AutoScrollPosition Property and using
Timer in VB.NET:

..NET Framework Class Library: ScrollableControl.AutoScrollPosition Property

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemwindowsformsscrollablecontrolclassautoscrollpositiontopic.asp

HOW TO: Create a Smooth ProgressBar in Visual Basic .NET
http://support.microsoft.com/?id=323088


Hope this helps!

Gary Chang
Microsoft Online Partner Support
Get Secure! – www.microsoft.com/security
This posting is provided "AS IS" with no warranties,and confers no rights.
--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top