Sizing of form

marlon
03-13-2003, 10:55 AM
How can I resize a form in a way that there is gonna be a scrollbar so I could put more controls into it. I wanted to do it in the design and run time.

Can anybody help me out?

Squirm
03-13-2003, 03:42 PM
Scrollbars on forms... a very bad idea.
Use a tab control to separate the controls into groups.

nighthawk
03-14-2003, 02:07 PM
I use scrollbars on forms often when the user requests more controls than can fit in a standard window. I think it works great and the customers don't complain...

It is a little tricky however. First you have to draw a picture box that covers the entire form. Then another picture box on top of that one to hold all of the controls. The second picture box will be longer but inside the first. The scroll bar goes on the first one.

Then just code the second picture box to move with the scroll bar.

It's a bit hard to explain so I just attached a small example project. It's a bit sloppy and thrown together but should get you started.

marlon
03-14-2003, 03:37 PM
I use scrollbars on forms often when the user requests more controls than can fit in a standard window. I think it works great and the customers don't complain...

It is a little tricky however. First you have to draw a picture box that covers the entire form. Then another picture box on top of that one to hold all of the controls. The second picture box will be longer but inside the first. The scroll bar goes on the first one.

Then just code the second picture box to move with the scroll bar.

It's a bit hard to explain so I just attached a small example project. It's a bit sloppy and thrown together but should get you started.


I could not find the attached sample project. Can you repost it again.

Thanks.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum