Solved

Form Scrolling

Posted on 2003-11-04
8
397 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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 50

Accepted Solution

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

Author Comment

by:bladefist
ID: 9696595
test
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

785 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