Limit on form heights?

  • Thread starter Thread starter Odin Jensen
  • Start date Start date
O

Odin Jensen

Please tell me this is a lie.

No matter what I do (code/editor) VS 2003 .NET won't let me make a
form higher than 1036?

This has to be a bug. Any workarounds?

Regards

Odin Jensen
 
* Odin Jensen said:
No matter what I do (code/editor) VS 2003 .NET won't let me make a
form higher than 1036?

Forms must not be larger than the screen.
 
This makes no sense. A win32 window can be resized to much larger than
current screen size. Surely this must be a .NET bug?

Regards

Odin
 
* Odin Jensen said:
This makes no sense. A win32 window can be resized to much larger than
current screen size. Surely this must be a .NET bug?

Did you try it? It won't work, even with applications implemented in
C++.
 
I can resize another window by getting it's handle and calling
MoveWindow. i can't check if it gets the actual size since it's
outside the screen, but I get no error.

It works also for internet explorer with scrolling, but that's a
custom control implementing it's own scrolling so it's hard to tell.

I just can't see why a window should be limited to the desktop size.
It's an odd restriction.

Regards

Odin
 
* Odin Jensen said:
I can resize another window by getting it's handle and calling
MoveWindow. i can't check if it gets the actual size since it's
outside the screen, but I get no error.

It works also for internet explorer with scrolling, but that's a
custom control implementing it's own scrolling so it's hard to tell.

The internet explorer doesn't use a large window, it paints the content
currently in the view to the window.
 
Yes. It's a custom control.

But it seems I'm able to resize windows larger than the screen from
C++.

Regards

Odin
 
Odin,
As Herfried stated: The "physical" size of the form is limited to your
desktop. Which is the outside of the form (the title bar & caption, the
scroll bars, the border).

However you can make the "logical" size of the form larger. What you need to
do is enable the Form.AutoScroll property & set the Form.AutoScrollMinSize
property to the "logical" size you want. When you do this your form will
have scroll bars to you can get at the parts of the form that are "off the
screen".

Note be careful when designing forms that are larger then the screen, as you
users may not want to use them, consider using Tab Pages or other controls
to organize your form in a more manageable format.


Hope this helps
Jay
 
Odin,
In addition to my other post, remember that AutoScroll will effect all
controls on your form, including Toolbars & StatusBars, you may want to
consider using a Docked Panel control as the actual scrollable region of
your form instead, with any ToolBars & StatusBars as siblings of the panel
control.

Charles Petzold's book "Programming Microsoft Windows with Microsoft Visual
Basic .NET" from MS Press (available in C# form also) has a chapter or two
on scrollable forms.

Hope this helps
Jay
 
Thanks for your help. I'll look into it.

Unfortunately our users wants the forms that way, or I would have
found another (and IMHO more userfriendly) way to do it.

Thanks again

Odin
 
Another quick comment.

If you use a usercontrol the limitation is not there. It's only there
on forms, so this kinda also solves my problem

Regards

Odin
 
Back
Top