Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Form expansion

Posted on 2009-03-30
5
Medium Priority
?
137 Views
Last Modified: 2013-12-26
How to make up and down scroll bar to show the entire form of the project?
My project has a lot of command button that accommodate the entire form. I need to expand it but i do not know how? Please give me some ideas or example on how to make it...
Thanks
0
Comment
Question by:Whing Dela Cruz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 24021908
You could put the controls on a frame and vary the value of the frame's Top property with the value of a vertical scroll bar.
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 24021929
Another idea is to use a tab control and to group the controls on different tabs.
0
 

Author Comment

by:Whing Dela Cruz
ID: 24024676
can you give me some examples? i do not know how to start it!
thanks!  
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 2000 total points
ID: 24026551
OK. I will assume that you want to use the first suggestion.
Select the existing controls. Cut (Ctrl+X) them to the clipboard.
Place a large frame control on the form. Then paste (Ctrl+V) the orginal controls on to the frame. If necessary, you can adjust the frame height in the properties window so that it is larger than the form.

There isn't all that much code.
Option Explicit
 
Private Sub Form_Load()
    'Frame1 is larger than the form.
    'Let the scroll bar span the difference
    VScroll1.Max = Frame1.Height - Form1.ScaleHeight
End Sub
 
 
Private Sub VScroll1_Change()
    Frame1.Top = -VScroll1.Value
End Sub

Open in new window

0
 

Author Closing Comment

by:Whing Dela Cruz
ID: 31564422
Thanks so much!
The code is working and i'm now starting my program..
thanks! more power!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

618 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