Solved

Form Scrolling

Posted on 2003-11-04
8
395 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
Comment Utility
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
Comment Utility
oops, change the frame1.height to frame1.top
0
 
LVL 3

Expert Comment

by:NBrownoh
Comment Utility
another oops, just do this for the change event
Private Sub VScroll1_Change()
    Frame1.Top = -VScroll1.Value
End Sub
0
 
LVL 1

Author Comment

by:bladefist
Comment Utility
Well I would really like a way to scroll the form.  But i'll try that..
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Author Comment

by:bladefist
Comment Utility
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
Comment Utility
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 49

Accepted Solution

by:
Ryan Chong earned 75 total points
Comment Utility
0
 
LVL 1

Author Comment

by:bladefist
Comment Utility
test
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now