Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VB6 Form Height Limitations?

1,109 views
Skip to first unread message

Brent Barton

unread,
Jul 11, 1999, 3:00:00 AM7/11/99
to
I have what I imagine is a relatively common objective: a rather long form
containing ~150 text boxes. I've run into two problems:

1. My system doesn't permit me to set the form height property to anything
greater than 11520 (which is 8" in twips), and I'd like considerably more
room than this. I'm at 1024x768 resolution. As far as I can see, MSDN / KB /
VB Docs say nothing other than that this property is "system dependent".

2. Scroll bars are an obvious need to provide access to the "offscreen"
parts of the form, but I really don't like the "kludginess" of the inner /
outer picture box approach to providing a scrollable "viewport".

Hopefully I'm missing something here... It seems absurd that VB won't
support longer forms with auto scrollbars. Anyone have any suggestions /
workarounds, other than a web browser approach?

Thanks,
B. Barton


Howard Henry Schlunder

unread,
Jul 11, 1999, 3:00:00 AM7/11/99
to
Brent Barton <b.barto...@worldnet.att.net> wrote in message
news:7man3d$3g9$1...@bgtnsc01.worldnet.att.net...

> I have what I imagine is a relatively common objective: a rather long form
> containing ~150 text boxes. I've run into two problems:
>
> 1. My system doesn't permit me to set the form height property to anything
> greater than 11520 (which is 8" in twips), and I'd like considerably more
> room than this. I'm at 1024x768 resolution. As far as I can see, MSDN / KB
/
> VB Docs say nothing other than that this property is "system dependent".

I'm running at 1024x768 as well. The maximum my form could be sized to is
1024+12 by 768+12. I'm not sure who came up with the 12 pixel buffer, but
it doesn't seem to stay that way on different resolutions. I upped my
Virtual Desktop size to 1600x1200 (1024x768 screen res). The max height
then became 1292.

> 2. Scroll bars are an obvious need to provide access to the "offscreen"
> parts of the form, but I really don't like the "kludginess" of the inner /
> outer picture box approach to providing a scrollable "viewport".

I'm not sure what you mean by "outer picture box". If you put one container
on the form and move it around with a single scroll bar, there is no second
picture box.

> Hopefully I'm missing something here... It seems absurd that VB won't
> support longer forms with auto scrollbars. Anyone have any suggestions /
> workarounds, other than a web browser approach?

I don't think you are missing anything. However, it is not VB's fault. Is
the the whole Windows display architecture at fault. I'm not sure how it is
limited, but if you ask me, I think it has to do with how video drivers
work. Everything on screen is actually kept in your video memory at all
times (To the best of my knowledge, anyway). With that, it makes it kind of
hard to exceed the standard desktop space by making a window go 1024x5,000
pixels tall or something while staying hardware independent. Since it
probably is left in memory, you would need 9.765625 megabytes of video RAM
for 16 bits per pixel color depth. Not all video cards have that much ram.
Not only that, but the video card firmware would have to be updated so that
only the standard 1024x768 or whatever gets painted by the RAMDAC and the
rest gets clipped.

Anyway, just in case I was wrong, I took out Appleman and looked around for
various API calls. I found one that supposivly changed the Device Context
Height and Width. I tried making my Desktop's Device Context something huge
and then trying to resize my window to something huge too. The limitation
was still apparent and the API calls reported nonzero, so I assume I did
everything right.

It just isn't possible. You have to use a child container and move it
around accordingly (or tie all your controls to a single scrollbar so that
you don't need a picture box or frame).


--
Howard Henry 'Gawyn Ballpeen' Schlunder
Gawyn Developments; Core developer
http://venus.ajusd.org/~hschlund/


Mike Williams

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to
Kludgy or not, a container (such as a Picture Box or a Frame) is the only
way you are going to get the job done. On my system at 640 x 480 I can set a
Form to a maximum height of 7200 Twips (5 inches) but I can set the height
of a Picture Box to 245745 (about 170 inches). You can use a single Picture
Box or one inside another (whatever suits the layout of the rest of your
Form) and placing a Scroll Bar next to it looks neat. It works fine for me.

Mike

Brent Barton <b.barto...@worldnet.att.net> wrote in message
news:7man3d$3g9$1...@bgtnsc01.worldnet.att.net...
> I have what I imagine is a relatively common objective: a rather long form
> containing ~150 text boxes. I've run into two problems:
>
> 1. My system doesn't permit me to set the form height property to anything
> greater than 11520 (which is 8" in twips), and I'd like considerably more
> room than this. I'm at 1024x768 resolution. As far as I can see, MSDN / KB
/
> VB Docs say nothing other than that this property is "system dependent".
>

> 2. Scroll bars are an obvious need to provide access to the "offscreen"
> parts of the form, but I really don't like the "kludginess" of the inner /
> outer picture box approach to providing a scrollable "viewport".
>

> Hopefully I'm missing something here... It seems absurd that VB won't
> support longer forms with auto scrollbars. Anyone have any suggestions /
> workarounds, other than a web browser approach?
>

> Thanks,
> B. Barton
>
>
>

Jason

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to
If you insist on scrolling (I wouldn't touch a program with such an
interface) then you'll have to use the "kludgy" picture box. I would suggest
the TabStrip if it is possible to segment your controls into logical groups.

Jason

Mike Williams

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to

Jason <jstan...@picknowl.com.au> wrote in message
news:3789...@newsserver1.picknowl.com.au...

> If you insist on scrolling (I wouldn't touch a program with such an
> interface) then you'll have to use the "kludgy" picture box.

So you don't use Internet Explorer or Outlook or Microsoft Word or Lotus
Wordpo or Visual Basic or . . . . .?

Mike


Brent Barton

unread,
Jul 12, 1999, 3:00:00 AM7/12/99
to
Thanks for the suggestion... The TabStrip is an obvious way to avoid a long
form, and may very well be the way to go in most circumstances... What I'm
interested in is an explanation of why this limitation exists in VB; it
doesn't in IE, for example.

Brent Barton


Jason <jstan...@picknowl.com.au> wrote in message
news:3789...@newsserver1.picknowl.com.au...
> If you insist on scrolling (I wouldn't touch a program with such an

Mike Williams

unread,
Jul 13, 1999, 3:00:00 AM7/13/99
to

Brent Barton <b.ba...@worldnet.att.net> wrote in message
news:7mdpll$ku0$1...@bgtnsc01.worldnet.att.net...

> What I'm interested in is an explanation of why this limitation exists in
VB;
> It doesn't in IE, for example.
>
> Brent Barton

Yes it does. You can write standard VB code which makes it virtually
impossible to tell the difference between a very long Form and a Form which
is just pretending to be very long.

Mike


Razoredge

unread,
Jul 13, 1999, 3:00:00 AM7/13/99
to
Well actually you are wrong, there's no form height limitation in VB. only
you can't make it any bigger than a particular size by stretching, after
reaching that particular size you gotta makee it bigger programmitically by
setting the form.height property.

If that dont work for you I dunno what will.

Bye
The Razor's Edge (Is a littile blunt nowadays)

And yeah like i Said Earlier, I would like to start a mailing list for VB,
but i need at least 20 subscribers to start it, right now I have 2.

This list will have sample code, examples, addresses of VB resources and
articles. If there's such a list already lemme join it, if there aint, lemme
start it.

Signet

unread,
Jul 13, 1999, 3:00:00 AM7/13/99
to
Razoredge <moserNO...@giasdl01.vsnl.net.in> wrote in
message news:7mgfk7$1fv$1...@news.vsnl.net.in...

> Well actually you are wrong, there's no form height limitation
in VB. only
> you can't make it any bigger than a particular size by
stretching, after
> reaching that particular size you gotta makee it bigger
programmitically by
> setting the form.height property.
>

Yeah, there is a limitation. Even in design mode, you can keep
dragging a form side-to-side, making it larger. Up to 12432
twips on my 1024x768 screen. This is approximately the screen
width, which appears to be the maximum size. Setting the size
from the properties window or programmatically doesn't help, you
can't exceed it.

--
Sig...@mindspring.com
--------------------------------
"For every action, there is an equal and opposite criticism."

Mike Williams

unread,
Jul 13, 1999, 3:00:00 AM7/13/99
to
Well actually, Razor, you are wrong - but then, most of us are wrong
sometimes ;-)

Private Sub Command1_Click()
Me.Height = 99999
Me.Caption = Format(Me.Height)
End Sub

Mike

Lee J. Weiner

unread,
Jul 13, 1999, 3:00:00 AM7/13/99
to
I think you ought to try it again, Mike. On my NT4/VB6 system set at 800X600,
when I use your code, the caption reads 9180 and the form is maxed at the
height of the screen.

Lee Weiner
weiner AT fuse DOT net
http://home.fuse.net/lweiner

In article <7mflrv$tge$2...@news4.svr.pol.co.uk>, "Mike Williams"

Don

unread,
Jul 13, 1999, 3:00:00 AM7/13/99
to
Hey Lee, If his settings did work he'd never be able to see what is
sticking out of the bottum of his crt anyway... <GriN>

--

Have a good day.
Don

Lee J. Weiner wrote in message <93188885...@news.remarQ.com>...

Howard Henry Schlunder

unread,
Jul 13, 1999, 3:00:00 AM7/13/99
to
I think you ought to read the posts again, Lee. Mike was making an
illustration that Razor was wrong. It wasn't supposed to actually become
99999 twips high.

Lee J. Weiner <wei...@xxx.xxx> wrote in message
news:93188885...@news.remarQ.com...

Mike Williams

unread,
Jul 14, 1999, 3:00:00 AM7/14/99
to
That's exactly what I was telling the man, Lee - because Razor's posting
stated that there was no limit. On my system I got the result 7380. I think
you've misread my posting.

Mike

Lee J. Weiner

unread,
Jul 14, 1999, 3:00:00 AM7/14/99
to
Sorry, Mike. With all the posting back and forth, I got confused as to who
was saying what.

Lee Weiner
weiner AT fuse DOT net
http://home.fuse.net/lweiner

In article <7mgvjv$vrj$1...@news4.svr.pol.co.uk>, "Mike Williams"

Razoredge

unread,
Jul 19, 1999, 3:00:00 AM7/19/99
to
Like I said, I am getting a little blunt

0 new messages