Solved

Form Scrolling

Posted on 2003-11-04
8
398 Views
Last Modified: 2010-05-03
I want my form, (Form1) to be able to scroll with a Vscroll1 like a webpage would. So the form would enlarge verticly and scroll down. How can i do that?
0
Comment
Question by:bladefist
  • 4
  • 3
8 Comments
 
LVL 3

Expert Comment

by:NBrownoh
ID: 9681737
its kind of hard to do with a vscroll
the easiest way would be to put all your controls in a frame then have vscroll control the position of that frame.  I would just set the min of the scrollbar to 0 and the max to the height of the frame.  then with the Private Sub VScroll1_Change() event just use the vscroll.value to set the height position of the frame.

Private Sub VScroll1_Change()
    Frame1.height = VScroll1.Value
End Sub
0
 
LVL 3

Expert Comment

by:NBrownoh
ID: 9681759
oops, change the frame1.height to frame1.top
0
 
LVL 3

Expert Comment

by:NBrownoh
ID: 9681767
another oops, just do this for the change event
Private Sub VScroll1_Change()
    Frame1.Top = -VScroll1.Value
End Sub
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:bladefist
ID: 9681805
Well I would really like a way to scroll the form.  But i'll try that..
0
 
LVL 1

Author Comment

by:bladefist
ID: 9681822
Ok well that will be tricky too...Because as I scroll up, I'll have to keep making the frame bigger and scroll bar bigger because the frame will just scroll off the screen.
0
 
LVL 3

Expert Comment

by:NBrownoh
ID: 9681878
na you can just set the max to the height of the fram minus the height of the form, then subtract the height of the title bar and it wont go off the form
0
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 75 total points
ID: 9683785
0
 
LVL 1

Author Comment

by:bladefist
ID: 9696595
test
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question