Scrolling on VB form

I am modifying an existing VB6 program that runs on a specialized type of fieldwork PC. It runs Windows 2000 Pro, but the Windows desktop interface is accessed via a lightpen and a small virtual keyboard. In addition, the physical screen size of the PC is 800 x 600 (though the resolution is higher). Therefore, the application has rather small windows and frequently displays a wizard-like interface.

All that having been said, I am constructing a rather complex form to add to the application. It is an electronic version of a hardcopy form that is used in the client's office. They have requested that the electronic version exactly mimic the hardcopy version, to ensure no learning curve for technicians in the field.

All well and good so far - but their hardcopy form has 2 pages to it. I've made it mostly through the first page, adding labels and textboxes where necessary. But, VB6 is not allowing me to vertically resize the form any larger than 15360 twips. NOTE: Horizontal size is not excessive, therefore not a problem.

I have already added a scroll bar to the form, to enable the technicians to see the whole thing but not all at once - keeping the form in a manageable desktop area is vital.

How can I size the form to a certain size, focused at the top, when loaded, thereby forcing the user to scroll down to see the rest of the form?

Why is Visual Studio not allowing me to resize it any taller at design time?

If this form MUST be split into more forms, what are the best practices for this?
Who is Participating?
Alkali_GuyConnect With a Mentor Commented:
Try not moving the radio buttons that reside in frames.  They should move along with the frame automatically.
Design the form at full size, putting all controls in a borderless frame.  Then shrink the frame and the form to the size you want.  You can move the items up and down inside the frame.

I'm not sure why Visual Studio won't let you size it larger.

To split the form, you can do it wizard style: have two superimposed sets of controls on your form, plus a Back and Next button.  When the user clicks the Next button, you hide the first set of controls and show the second.  A simpler way is of course to design two separate forms that appear in sequence.  Have a "Finish" button with the second set of controls (you can rename the Next button) that the user can push to dismiss the forms.
k3n51mmAuthor Commented:
Please clarify your answer with more detail:
"Then shrink the frame and the form to the size you want.  You can move the items up and down inside the frame."

I don't understand why I should use a frame. Do you assume I will add a scroll bar to it? How? Why not just do this with the form itself?

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

k3n51mmAuthor Commented:
Okay, since I already had a scrollbar on the form, I did not add a frame. I have resized/recentered the form at load time and it works - the scrollbar automatically sizes using the code I already had.

Ryan_RIT Systems AdministratorCommented:
another approach - use a tabbed style interface (like the tabs you see in Display properties) - you could then have Page 1 on one tab and Page 2 on the other
k3n51mmAuthor Commented:
Thanks Ryan, but it is not up to me to redesign this app unfortunately. I have to work with it no matter how stupid it is. However, by setting a larger height in the Properties window instead of graphically, it seems to work.

But anyway, I do have another scrolling question, if you might want these 500 points.... I found scroll code here on EE, and it has worked fine till now. However, I discovered that to pair off separate Yes/No radio buttons, I had to place them inside Frames. Otherwise, clicking a YES radio button from Option12 would make Option1's NO button also deselect.

So now when I hit the scroll arrows, the radio buttons scroll out of the frames, which follow the rest of the controls on the form. Checking the radio buttons' Top attribute, they're set relative to the Frame control I suppose, since their Top values are all 0. The scroll code adjusts the Top attributes of each control on the form, thereby showing the scroll effect.

What gives, and how do I fix it?

k3n51mmAuthor Commented:
thanks AG
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.